diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-05 03:37:14 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-05 03:37:14 (GMT) |
commit | c7ac041e5180d118e300a050d9c579467230a48c (patch) | |
tree | 396f19b89df7a8da97f459385f4f5ceff58ccede | |
parent | 9b7e3943b0e67af48fdbb993c5c4cc93dac81304 (diff) | |
parent | a2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25 (diff) | |
download | Qt-c7ac041e5180d118e300a050d9c579467230a48c.zip Qt-c7ac041e5180d118e300a050d9c579467230a48c.tar.gz Qt-c7ac041e5180d118e300a050d9c579467230a48c.tar.bz2 |
Merge remote branch 'staging/4.7' into bearermanagement/polling
630 files changed, 19326 insertions, 14628 deletions
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/tests/auto/declarative/qdeclarativewebview/testtypes.cpp b/config.tests/unix/pulseaudio/pulseaudiotest.cpp index 7efc214..eed88da 100644 --- a/tests/auto/declarative/qdeclarativewebview/testtypes.cpp +++ b/config.tests/unix/pulseaudio/pulseaudiotest.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -38,15 +38,12 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "testtypes.h" -void MyWebView::drawContents(QPainter *p, const QRect &r) -{ - pp += r.width()*r.height(); - QDeclarativeWebView::drawContents(p,r); -} +#include <pulse/pulseaudio.h> -void registerTypes() +int main(int ,char **) { - QML_REGISTER_TYPE(Test,1,0,MyWebView,MyWebView); + pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); + return 0; } + @@ -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 @@ -4322,7 +4323,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 @@ -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 @@ -6074,6 +6083,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 @@ -6439,6 +6457,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 +7176,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 +7680,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/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml index 9604f10..862eeb1 100644 --- a/demos/declarative/flickr/common/ImageDetails.qml +++ b/demos/declarative/flickr/common/ImageDetails.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Flipable { id: container diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml index 174cd21..938a080 100644 --- a/demos/declarative/flickr/common/Loading.qml +++ b/demos/declarative/flickr/common/Loading.qml @@ -2,7 +2,7 @@ import Qt 4.6 Image { id: loading; source: "pics/loading.png"; transformOrigin: "Center" - rotation: NumberAnimation { + NumberAnimation on rotation { from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900 } } diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index 7634573..291d874 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -23,7 +23,7 @@ Item { anchors.centerIn: parent scale: 0.0 - scale: Behavior { NumberAnimation { easing.type: "InOutQuad"} } + Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} } id: scaleMe Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index c51371c..2f4df8a 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -45,7 +45,7 @@ Flipable { Text { color: "white"; elide: Text.ElideRight; text: "<b>Author:</b> " + container.photoAuthor } Text { color: "white"; elide: Text.ElideRight; text: "<b>Published:</b> " + container.photoDate } Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "<b>Tags:</b> " } - Text { color: "white"; elide: Text.ElideRight; elide: Text.ElideRight; text: container.photoTags } + Text { color: "white"; elide: Text.ElideRight; text: container.photoTags } } } diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml index 75c4572..381664b 100644 --- a/demos/declarative/flickr/mobile/ListDelegate.qml +++ b/demos/declarative/flickr/mobile/ListDelegate.qml @@ -15,8 +15,8 @@ Component { Column { x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2 Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } - Text { text: photoAuthor; color: "white"; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } - Text { text: photoDate; color: "white"; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } } } diff --git a/demos/declarative/minehunt/Description.qml b/demos/declarative/minehunt/Description.qml deleted file mode 100644 index cc4d3b2..0000000 --- a/demos/declarative/minehunt/Description.qml +++ /dev/null @@ -1,34 +0,0 @@ -import Qt 4.6 - -Item { - id: page - height: myText.height + 20 - property var text - MouseArea { - anchors.fill: parent - drag.target: page - drag.axis: "XandYAxis" - drag.minimumX: 0 - drag.maximumX: 1000 - drag.minimumY: 0 - drag.maximumY: 1000 - } - Rectangle { - radius: 10 - anchors.fill: parent - color: "lightsteelblue" - } - Item { - x: 10 - y: 10 - width: parent.width - 20 - height: parent.height - 20 - Text { - id: myText - text: page.text - width: parent.width - clip: true - wrap: true - } - } -} diff --git a/demos/declarative/minehunt/Explosion.qml b/demos/declarative/minehunt/MinehuntCore/Explosion.qml index e337c46..e337c46 100644 --- a/demos/declarative/minehunt/Explosion.qml +++ b/demos/declarative/minehunt/MinehuntCore/Explosion.qml diff --git a/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg Binary files differindex 445567f..445567f 100644 --- a/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg +++ b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg diff --git a/demos/declarative/minehunt/pics/back.png b/demos/declarative/minehunt/MinehuntCore/pics/back.png Binary files differindex f6b3f0b..f6b3f0b 100644 --- a/demos/declarative/minehunt/pics/back.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/back.png diff --git a/demos/declarative/minehunt/pics/bomb-color.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png Binary files differindex 61ad0a9..61ad0a9 100644 --- a/demos/declarative/minehunt/pics/bomb-color.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png diff --git a/demos/declarative/minehunt/pics/bomb.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png Binary files differindex a992575..a992575 100644 --- a/demos/declarative/minehunt/pics/bomb.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png diff --git a/demos/declarative/minehunt/pics/face-sad.png b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png Binary files differindex cf00aaf..cf00aaf 100644 --- a/demos/declarative/minehunt/pics/face-sad.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png diff --git a/demos/declarative/minehunt/pics/face-smile-big.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png Binary files differindex f9c2335..f9c2335 100644 --- a/demos/declarative/minehunt/pics/face-smile-big.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png diff --git a/demos/declarative/minehunt/pics/face-smile.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png Binary files differindex 3d66d72..3d66d72 100644 --- a/demos/declarative/minehunt/pics/face-smile.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png diff --git a/demos/declarative/minehunt/pics/flag-color.png b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png Binary files differindex aadad0f..aadad0f 100644 --- a/demos/declarative/minehunt/pics/flag-color.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png diff --git a/demos/declarative/minehunt/pics/flag.png b/demos/declarative/minehunt/MinehuntCore/pics/flag.png Binary files differindex 39cde4d..39cde4d 100644 --- a/demos/declarative/minehunt/pics/flag.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/flag.png diff --git a/demos/declarative/minehunt/pics/front.png b/demos/declarative/minehunt/MinehuntCore/pics/front.png Binary files differindex 834331b..834331b 100644 --- a/demos/declarative/minehunt/pics/front.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/front.png diff --git a/demos/declarative/minehunt/pics/star.png b/demos/declarative/minehunt/MinehuntCore/pics/star.png Binary files differindex 3772359..3772359 100644 --- a/demos/declarative/minehunt/pics/star.png +++ b/demos/declarative/minehunt/MinehuntCore/pics/star.png diff --git a/demos/declarative/minehunt/MinehuntCore/qmldir b/demos/declarative/minehunt/MinehuntCore/qmldir new file mode 100644 index 0000000..862c396 --- /dev/null +++ b/demos/declarative/minehunt/MinehuntCore/qmldir @@ -0,0 +1,2 @@ +plugin minehunt +Explosion 1.0 Explosion.qml diff --git a/demos/declarative/minehunt/README b/demos/declarative/minehunt/README new file mode 100644 index 0000000..7379dcf --- /dev/null +++ b/demos/declarative/minehunt/README @@ -0,0 +1,3 @@ +To run, simply load the minehunt.qml file with the qml runtime. + +Note that on X11, this demo has problems with the native graphicssystem. If you are using the X11 window system, please pass -graphicssystem raster to the qml binary. diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/minehunt.cpp index e7a1d7c..89845ef 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/minehunt.cpp @@ -38,21 +38,15 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "qdeclarativeengine.h" -#include "qdeclarativecontext.h" -#include "qdeclarative.h" -#include <qdeclarativeitem.h> -#include <qdeclarativeview.h> - -#include <QWidget> -#include <QApplication> -#include <QFile> + +#include <stdlib.h> +#include <qdeclarativeextensionplugin.h> +#include <qdeclarativecontext.h> +#include <qdeclarativeengine.h> +#include <qdeclarative.h> + #include <QTime> #include <QTimer> -#include <QVBoxLayout> -#include <QFileInfo> - -QString fileName = "minehunt.qml"; class Tile : public QObject { @@ -91,17 +85,14 @@ private: bool _flipped; }; -QML_DECLARE_TYPE(Tile); - -class MyWidget : public QWidget +class MinehuntGame : public QObject { -Q_OBJECT + Q_OBJECT public: - MyWidget(int = 370, int = 480, QWidget *parent=0, Qt::WindowFlags flags=0); - ~MyWidget(); + MinehuntGame(); Q_PROPERTY(QDeclarativeListProperty<Tile> tiles READ tiles CONSTANT); - QDeclarativeListProperty<Tile> tiles() { return _tilesProperty; } + QDeclarativeListProperty<Tile> tiles() { return QDeclarativeListProperty<Tile>(this, _tiles); } Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged); bool isPlaying() {return playing;} @@ -133,10 +124,7 @@ private: int getHint(int row, int col); void setPlaying(bool b){if(b==playing) return; playing=b; emit isPlayingChanged();} - QDeclarativeView *canvas; - QList<Tile *> _tiles; - QDeclarativeListProperty<Tile> _tilesProperty; int numCols; int numRows; bool playing; @@ -146,11 +134,10 @@ private: int nFlags; }; -Q_DECLARE_METATYPE(QList<Tile*>) -MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags) -: QWidget(parent, flags), canvas(0), numCols(9), numRows(9), playing(true), won(false) +MinehuntGame::MinehuntGame() +: numCols(9), numRows(9), playing(true), won(false) { - setObjectName("mainWidget"); + setObjectName("mainObject"); srand(QTime(0,0,0).secsTo(QTime::currentTime())); //initialize array @@ -159,27 +146,9 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags } reset(); - QVBoxLayout *vbox = new QVBoxLayout; - vbox->setMargin(0); - setLayout(vbox); - - canvas = new QDeclarativeView(this); - canvas->setFixedSize(width, height); - vbox->addWidget(canvas); - - _tilesProperty = QDeclarativeListProperty<Tile>(this, _tiles); - - QDeclarativeContext *ctxt = canvas->rootContext(); - ctxt->addDefaultObject(this); - - canvas->setSource(QUrl::fromLocalFile(fileName)); -} - -MyWidget::~MyWidget() -{ } -void MyWidget::setBoard() +void MinehuntGame::setBoard() { foreach(Tile* t, _tiles){ t->setHasMine(false); @@ -213,7 +182,7 @@ void MyWidget::setBoard() setPlaying(true); } -void MyWidget::reset() +void MinehuntGame::reset() { foreach(Tile* t, _tiles){ t->unflip(); @@ -225,7 +194,7 @@ void MyWidget::reset() QTimer::singleShot(600,this, SLOT(setBoard())); } -int MyWidget::getHint(int row, int col) +int MinehuntGame::getHint(int row, int col) { int hint = 0; for (int c = col-1; c <= col+1; c++) @@ -237,7 +206,7 @@ int MyWidget::getHint(int row, int col) return hint; } -bool MyWidget::flip(int row, int col) +bool MinehuntGame::flip(int row, int col) { if(!playing) return false; @@ -302,7 +271,7 @@ bool MyWidget::flip(int row, int col) return true; } -bool MyWidget::flag(int row, int col) +bool MinehuntGame::flag(int row, int col) { Tile *t = tile(row, col); if(!t) @@ -313,42 +282,33 @@ bool MyWidget::flag(int row, int col) emit numFlagsChanged(); return true; } -///////////////////////////////////////////////////////// -int main(int argc, char ** argv) +QML_DECLARE_TYPE(Tile); +QML_DECLARE_TYPE(MinehuntGame); + +class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin { -#ifdef Q_WS_X11 - // native on X11 is terrible for this demo. - QApplication::setGraphicsSystem("raster"); -#endif - QApplication app(argc, argv); - - bool frameless = false; - - int width = 370; - int height = 480; - - QML_REGISTER_TYPE(0,0,0,Tile,Tile); - - for (int i = 1; i < argc; ++i) { - QString arg = argv[i]; - if (arg == "-frameless") { - frameless = true; - } else if(arg == "-width" && i < (argc - 1)) { - ++i; - width = ::atoi(argv[i]); - } else if(arg == "-height" && i < (argc - 1)) { - ++i; - height = ::atoi(argv[i]); - } else if (arg[0] != '-') { - fileName = arg; - } + Q_OBJECT + + public: + void registerTypes(const char *uri) { + Q_UNUSED(uri); + QML_REGISTER_TYPE(SameGameCore, 0, 1, Tile, Tile); + QML_REGISTER_TYPE(SameGameCore, 0, 1, Game, MinehuntGame); } - MyWidget wid(width, height, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget); - wid.show(); + void initializeEngine(QDeclarativeEngine *engine, const char *uri) { + Q_UNUSED(uri); - return app.exec(); -} + srand(QTime(0,0,0).secsTo(QTime::currentTime())); + + MinehuntGame* game = new MinehuntGame(); + + engine->rootContext()->addDefaultObject(game); + } +}; + +#include "minehunt.moc" + +Q_EXPORT_PLUGIN(MinehuntExtensionPlugin); -#include "main.moc" diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 01791b1..a497b0f 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -1,9 +1,11 @@ -SOURCES = main.cpp +TEMPLATE = lib +TARGET = minehunt +QT += declarative +CONFIG += qt plugin -QT += script declarative -contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, opengles1): QT += opengl +TARGET = $$qtLibraryTarget($$TARGET) +DESTDIR = MinehuntCore + +# Input +SOURCES += minehunt.cpp -target.path = $$[QT_INSTALL_EXAMPLES]/declarative/minehunt -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS minehunt.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/minehunt -INSTALLS += target sources diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index 8a3cab1..9e99706 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import MinehuntCore 1.0 Item { id: field @@ -24,15 +25,15 @@ Item { angle: flipable.angle; } front: Image { - source: "pics/front.png" + source: "MinehuntCore/pics/front.png" width: 40 height: 40 Image { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - source: "pics/flag.png" + source: "MinehuntCore/pics/flag.png" opacity: modelData.hasFlag - opacity: Behavior { + Behavior on opacity { NumberAnimation { property: "opacity" duration: 250 @@ -41,7 +42,7 @@ Item { } } back: Image { - source: "pics/back.png" + source: "MinehuntCore/pics/back.png" width: 40 height: 40 Text { @@ -55,7 +56,7 @@ Item { Image { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - source: "pics/bomb.png" + source: "MinehuntCore/pics/bomb.png" opacity: modelData.hasMine } Explosion { @@ -120,16 +121,9 @@ Item { } ] Image { - source: "pics/No-Ones-Laughing-3.jpg" + source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg" fillMode: Image.Tile } - Description { - text: "Use the 'minehunt' executable to run this demo!" - width: 300 - opacity: tiles?0:1 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - } Repeater { id: repeater model: tiles @@ -156,7 +150,7 @@ Item { Image { // x: 100 // y: 20 - source: "pics/bomb-color.png" + source: "MinehuntCore/pics/bomb-color.png" } Text { // x: 100 @@ -172,7 +166,7 @@ Item { Image { // x: 140 // y: 20 - source: "pics/flag-color.png" + source: "MinehuntCore/pics/flag-color.png" } Text { // x: 140 @@ -187,7 +181,7 @@ Item { y: 390 anchors.right: field.right anchors.rightMargin: 20 - source: isPlaying ? 'pics/face-smile.png' : hasWon ? 'pics/face-smile-big.png': 'pics/face-sad.png' + source: isPlaying ? 'MinehuntCore/pics/face-smile.png' : hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png' MouseArea { anchors.fill: parent onPressed: { reset() } diff --git a/demos/declarative/minehunt/test.qml b/demos/declarative/minehunt/test.qml deleted file mode 100644 index 11ed182..0000000 --- a/demos/declarative/minehunt/test.qml +++ /dev/null @@ -1,13 +0,0 @@ -import Qt 4.6 - - Image { - source: "pics/front.png" - width: 40 - height: 40 - Image { - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - source: "pics/flag.png" - opacity: 1 - } - } diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml index 723e62a..e48194a 100644 --- a/demos/declarative/samegame/content/BoomBlock.qml +++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml @@ -7,8 +7,8 @@ Item { id:block property int targetX: 0 property int targetY: 0 - x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } - y: SpringFollow { source: targetY; spring: 2; damping: 0.2 } + SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } + SpringFollow on y { source: targetY; spring: 2; damping: 0.2 } Image { id: img source: { @@ -21,7 +21,7 @@ Item { id:block } } opacity: 0 - opacity: Behavior { NumberAnimation { duration: 200 } } + Behavior on opacity { NumberAnimation { duration: 200 } } anchors.fill: parent } diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml index 6629302..6629302 100644 --- a/demos/declarative/samegame/content/Button.qml +++ b/demos/declarative/samegame/SamegameCore/Button.qml diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml index 7769328..6d5d6b5 100644 --- a/demos/declarative/samegame/content/Dialog.qml +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml @@ -14,7 +14,7 @@ Rectangle { property Item text: myText color: "white"; border.width: 1; width: myText.width + 20; height: myText.height + 40; opacity: 0 - opacity: Behavior { + Behavior on opacity { NumberAnimation { duration: 1000 } } Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } diff --git a/demos/declarative/samegame/content/pics/background.png b/demos/declarative/samegame/SamegameCore/pics/background.png Binary files differindex 3734a27..3734a27 100644 --- a/demos/declarative/samegame/content/pics/background.png +++ b/demos/declarative/samegame/SamegameCore/pics/background.png diff --git a/demos/declarative/samegame/content/pics/blueStar.png b/demos/declarative/samegame/SamegameCore/pics/blueStar.png Binary files differindex ff9588f..ff9588f 100644 --- a/demos/declarative/samegame/content/pics/blueStar.png +++ b/demos/declarative/samegame/SamegameCore/pics/blueStar.png diff --git a/demos/declarative/samegame/content/pics/blueStone.png b/demos/declarative/samegame/SamegameCore/pics/blueStone.png Binary files differindex 20e43c7..20e43c7 100644 --- a/demos/declarative/samegame/content/pics/blueStone.png +++ b/demos/declarative/samegame/SamegameCore/pics/blueStone.png diff --git a/demos/declarative/samegame/content/pics/greenStar.png b/demos/declarative/samegame/SamegameCore/pics/greenStar.png Binary files differindex cd06854..cd06854 100644 --- a/demos/declarative/samegame/content/pics/greenStar.png +++ b/demos/declarative/samegame/SamegameCore/pics/greenStar.png diff --git a/demos/declarative/samegame/content/pics/greenStone.png b/demos/declarative/samegame/SamegameCore/pics/greenStone.png Binary files differindex b568a19..b568a19 100644 --- a/demos/declarative/samegame/content/pics/greenStone.png +++ b/demos/declarative/samegame/SamegameCore/pics/greenStone.png diff --git a/demos/declarative/samegame/content/pics/redStar.png b/demos/declarative/samegame/SamegameCore/pics/redStar.png Binary files differindex 0a4dffe..0a4dffe 100644 --- a/demos/declarative/samegame/content/pics/redStar.png +++ b/demos/declarative/samegame/SamegameCore/pics/redStar.png diff --git a/demos/declarative/samegame/content/pics/redStone.png b/demos/declarative/samegame/SamegameCore/pics/redStone.png Binary files differindex 36b09a2..36b09a2 100644 --- a/demos/declarative/samegame/content/pics/redStone.png +++ b/demos/declarative/samegame/SamegameCore/pics/redStone.png diff --git a/demos/declarative/samegame/content/pics/star.png b/demos/declarative/samegame/SamegameCore/pics/star.png Binary files differindex defbde5..defbde5 100644 --- a/demos/declarative/samegame/content/pics/star.png +++ b/demos/declarative/samegame/SamegameCore/pics/star.png diff --git a/demos/declarative/samegame/content/pics/yellowStone.png b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png Binary files differindex b1ce762..b1ce762 100644 --- a/demos/declarative/samegame/content/pics/yellowStone.png +++ b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png diff --git a/demos/declarative/samegame/content/qmldir b/demos/declarative/samegame/SamegameCore/qmldir index a8f8a98..a8f8a98 100644 --- a/demos/declarative/samegame/content/qmldir +++ b/demos/declarative/samegame/SamegameCore/qmldir diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js index c0f10bd..1214b79 100755 --- a/demos/declarative/samegame/content/samegame.js +++ b/demos/declarative/samegame/SamegameCore/samegame.js @@ -4,7 +4,7 @@ var maxX = 10;//Nums are for gameCanvas.tileSize 40 var maxY = 15; var maxIndex = maxX*maxY; var board = new Array(maxIndex); -var tileSrc = "content/BoomBlock.qml"; +var tileSrc = "SamegameCore/BoomBlock.qml"; var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php"; var scoresURL = ""; var timer; diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 50f6293..3b19cbe 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -1,5 +1,5 @@ import Qt 4.6 -import "content" +import SamegameCore 1.0 Rectangle { id: screen @@ -12,7 +12,7 @@ Rectangle { Image { id: background - anchors.fill: parent; source: "content/pics/background.png" + anchors.fill: parent; source: "SamegameCore/pics/background.png" fillMode: Image.PreserveAspectCrop smooth: true } @@ -22,7 +22,7 @@ Rectangle { property int score: 0 property int tileSize: 40 - Script { source: "content/samegame.js" } + Script { source: "SamegameCore/samegame.js" } z: 20; anchors.centerIn: parent width: parent.width - (parent.width % getTileSize()); @@ -39,7 +39,7 @@ Rectangle { Dialog { id: scoreName; anchors.centerIn: parent; z: 22; property int initialWidth: 0 - width: Behavior{NumberAnimation{} enabled: initialWidth!=0} + Behavior on width {NumberAnimation{} enabled: initialWidth!=0} Text { id: spacer anchors.left: scoreName.left diff --git a/demos/declarative/snake/content/Cookie.qml b/demos/declarative/snake/content/Cookie.qml index 7f0aadf..0ea95cb 100644 --- a/demos/declarative/snake/content/Cookie.qml +++ b/demos/declarative/snake/content/Cookie.qml @@ -17,7 +17,7 @@ Item { anchors.fill: parent source: "pics/cookie.png" opacity: 0 - opacity: Behavior { NumberAnimation { duration: 100 } } + Behavior on opacity { NumberAnimation { duration: 100 } } Text { font.bold: true anchors.verticalCenter: parent.verticalCenter diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml index 1b3f7bf..31ac4b9 100644 --- a/demos/declarative/snake/content/Link.qml +++ b/demos/declarative/snake/content/Link.qml @@ -13,8 +13,8 @@ Item { id:link x: margin - 3 + gridSize * column y: margin - 3 + gridSize * row - x: Behavior { NumberAnimation { duration: spawned ? heartbeatInterval : 0} } - y: Behavior { NumberAnimation { duration: spawned ? heartbeatInterval : 0 } } + Behavior on x { NumberAnimation { duration: spawned ? heartbeatInterval : 0} } + Behavior on y { NumberAnimation { duration: spawned ? heartbeatInterval : 0 } } Item { @@ -35,7 +35,7 @@ Item { id:link id: actualImageRotation origin.x: width/2; origin.y: height/2; angle: rotation * 90 - angle: Behavior{ NumberAnimation { duration: spawned ? 200 : 0} } + Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} } } } @@ -44,7 +44,7 @@ Item { id:link } opacity: 0 - opacity: Behavior { NumberAnimation { duration: 200 } } + Behavior on opacity { NumberAnimation { duration: 200 } } } diff --git a/demos/declarative/snake/content/Skull.qml b/demos/declarative/snake/content/Skull.qml index 585e7d3..821996a 100644 --- a/demos/declarative/snake/content/Skull.qml +++ b/demos/declarative/snake/content/Skull.qml @@ -9,11 +9,11 @@ Image { x: margin + column * gridSize + 2 y: margin + row * gridSize - 3 - x: Behavior { NumberAnimation { duration: spawned ? halfbeatInterval : 0} } - y: Behavior { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } } + Behavior on x { NumberAnimation { duration: spawned ? halfbeatInterval : 0} } + Behavior on y { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } } opacity: spawned ? 1 : 0 - opacity: Behavior { NumberAnimation { duration: 200 } } + Behavior on opacity { NumberAnimation { duration: 200 } } source: "pics/skull.png" width: 24 diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index a65aebc..12176c7 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -54,7 +54,7 @@ function startNewGame() } else { if(linkComponent.isReady == false){ if(linkComponent.isError == true) - print(linkComponent.errorString()); + print(linkComponent.errorsString()); else print("Still loading linkComponent"); continue;//TODO: Better error handling? @@ -295,7 +295,7 @@ function createCookie(value) { if(cookieComponent.isReady == false){ if(cookieComponent.isError == true) - print(cookieComponent.errorString()); + print(cookieComponent.errorsString()); else print("Still loading cookieComponent"); return;//TODO: Better error handling? diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index 09b6b7f..f9d02c7 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -65,7 +65,7 @@ Rectangle { anchors.fill: parent anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - opacity: Behavior { NumberAnimation { duration: 500 } } + Behavior on opacity { NumberAnimation { duration: 500 } } Text { color: "white" @@ -121,7 +121,7 @@ Rectangle { Rectangle { id: progressBar opacity: 0 - opacity: Behavior { NumberAnimation { duration: 200 } } + Behavior on opacity { NumberAnimation { duration: 200 } } color: "transparent" border.width: 2 border.color: "#221edd" @@ -137,7 +137,7 @@ Rectangle { id: progressIndicator color: "#221edd"; width: 0; - width: Behavior { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}} + Behavior on width { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}} height: 30; } } diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/TwitterCore/AuthView.qml index bcf4646..bcf4646 100644 --- a/demos/declarative/twitter/content/AuthView.qml +++ b/demos/declarative/twitter/TwitterCore/AuthView.qml diff --git a/demos/declarative/twitter/content/Button.qml b/demos/declarative/twitter/TwitterCore/Button.qml index 4cba8c3..4cba8c3 100644 --- a/demos/declarative/twitter/content/Button.qml +++ b/demos/declarative/twitter/TwitterCore/Button.qml diff --git a/demos/declarative/twitter/content/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml index 2b9288b..0f013e6 100644 --- a/demos/declarative/twitter/content/FatDelegate.qml +++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml @@ -37,7 +37,7 @@ Component { + '<a href="app://@'+userScreenName+'"><b>'+userScreenName + "</b></a> from " +source + "<br /><b>" + addTags(statusText) + "</b></html>"; textFormat: Qt.RichText - color: "white"; color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true + color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true anchors.left: whiteRect.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6 onLinkActivated: handleLink(link) } diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml index a206c87..a206c87 100644 --- a/demos/declarative/twitter/content/HomeTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml diff --git a/demos/declarative/twitter/content/Loading.qml b/demos/declarative/twitter/TwitterCore/Loading.qml index 3151415..76bf64b 100644 --- a/demos/declarative/twitter/content/Loading.qml +++ b/demos/declarative/twitter/TwitterCore/Loading.qml @@ -2,7 +2,7 @@ import Qt 4.6 Image { id: loading; source: "images/loading.png"; transformOrigin: "Center" - rotation: NumberAnimation { + NumberAnimation on rotation { from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900 } } diff --git a/demos/declarative/twitter/content/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml index e0205b8..e0205b8 100644 --- a/demos/declarative/twitter/content/MultiTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml diff --git a/demos/declarative/twitter/content/RssModel.qml b/demos/declarative/twitter/TwitterCore/RssModel.qml index 9d88bb7..9d88bb7 100644 --- a/demos/declarative/twitter/content/RssModel.qml +++ b/demos/declarative/twitter/TwitterCore/RssModel.qml diff --git a/demos/declarative/twitter/content/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml index 149aa82..149aa82 100644 --- a/demos/declarative/twitter/content/TitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml diff --git a/demos/declarative/twitter/content/ToolBar.qml b/demos/declarative/twitter/TwitterCore/ToolBar.qml index f96c767..f96c767 100644 --- a/demos/declarative/twitter/content/ToolBar.qml +++ b/demos/declarative/twitter/TwitterCore/ToolBar.qml diff --git a/demos/declarative/twitter/content/UserModel.qml b/demos/declarative/twitter/TwitterCore/UserModel.qml index c146b84..c146b84 100644 --- a/demos/declarative/twitter/content/UserModel.qml +++ b/demos/declarative/twitter/TwitterCore/UserModel.qml diff --git a/demos/declarative/twitter/content/images/gloss.png b/demos/declarative/twitter/TwitterCore/images/gloss.png Binary files differindex 5d370cd..5d370cd 100644 --- a/demos/declarative/twitter/content/images/gloss.png +++ b/demos/declarative/twitter/TwitterCore/images/gloss.png diff --git a/demos/declarative/twitter/content/images/lineedit.png b/demos/declarative/twitter/TwitterCore/images/lineedit.png Binary files differindex 2cc38dc..2cc38dc 100644 --- a/demos/declarative/twitter/content/images/lineedit.png +++ b/demos/declarative/twitter/TwitterCore/images/lineedit.png diff --git a/demos/declarative/twitter/content/images/lineedit.sci b/demos/declarative/twitter/TwitterCore/images/lineedit.sci index 054bff7..054bff7 100644 --- a/demos/declarative/twitter/content/images/lineedit.sci +++ b/demos/declarative/twitter/TwitterCore/images/lineedit.sci diff --git a/demos/declarative/twitter/content/images/loading.png b/demos/declarative/twitter/TwitterCore/images/loading.png Binary files differindex 47a1589..47a1589 100644 --- a/demos/declarative/twitter/content/images/loading.png +++ b/demos/declarative/twitter/TwitterCore/images/loading.png diff --git a/demos/declarative/twitter/content/images/stripes.png b/demos/declarative/twitter/TwitterCore/images/stripes.png Binary files differindex 9f36727..9f36727 100644 --- a/demos/declarative/twitter/content/images/stripes.png +++ b/demos/declarative/twitter/TwitterCore/images/stripes.png diff --git a/demos/declarative/twitter/content/images/titlebar.png b/demos/declarative/twitter/TwitterCore/images/titlebar.png Binary files differindex 51c9008..51c9008 100644 --- a/demos/declarative/twitter/content/images/titlebar.png +++ b/demos/declarative/twitter/TwitterCore/images/titlebar.png diff --git a/demos/declarative/twitter/content/images/titlebar.sci b/demos/declarative/twitter/TwitterCore/images/titlebar.sci index 0418d94..0418d94 100644 --- a/demos/declarative/twitter/content/images/titlebar.sci +++ b/demos/declarative/twitter/TwitterCore/images/titlebar.sci diff --git a/demos/declarative/twitter/content/images/toolbutton.png b/demos/declarative/twitter/TwitterCore/images/toolbutton.png Binary files differindex 1131001..1131001 100644 --- a/demos/declarative/twitter/content/images/toolbutton.png +++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.png diff --git a/demos/declarative/twitter/content/images/toolbutton.sci b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci index 9e4f965..9e4f965 100644 --- a/demos/declarative/twitter/content/images/toolbutton.sci +++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci diff --git a/demos/declarative/twitter/TwitterCore/qmldir b/demos/declarative/twitter/TwitterCore/qmldir new file mode 100644 index 0000000..8b56c56 --- /dev/null +++ b/demos/declarative/twitter/TwitterCore/qmldir @@ -0,0 +1,10 @@ +AuthView 1.0 AuthView.qml +Button 1.0 Button.qml +FatDelegate 1.0 FatDelegate.qml +HomeTitleBar 1.0 HomeTitleBar.qml +Loading 1.0 Loading.qml +MultiTitleBar 1.0 MultiTitleBar.qml +TitleBar 1.0 TitleBar.qml +RssModel 1.0 RssModel.qml +UserModel 1.0 UserModel.qml +ToolBar 1.0 ToolBar.qml diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml index b091b03..259f79a 100644 --- a/demos/declarative/twitter/twitter.qml +++ b/demos/declarative/twitter/twitter.qml @@ -1,5 +1,5 @@ import Qt 4.6 -import "content" as Twitter +import TwitterCore 1.0 as Twitter Item { id: screen; width: 320; height: 480 @@ -28,14 +28,14 @@ Item { id: background anchors.fill: parent; color: "#343434"; - Image { source: "content/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } + Image { source: "TwitterCore/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } Twitter.RssModel { id: rssModel } Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'} Text { width: 180 text: "Could not access twitter using this screen name and password pair."; - color: "white"; color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true + color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true visible: rssModel.status==XmlListModel.Error; anchors.centerIn: parent } diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index 76a5813..30a5d78 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Flickable { property alias title: webView.title @@ -22,6 +23,7 @@ Flickable { WebView { id: webView pixelCacheSize: 4000000 + transformOrigin: Item.TopLeft Script { function fixUrl(url) diff --git a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml index 19b6acc..d282209 100644 --- a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml +++ b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml @@ -85,7 +85,7 @@ Item { font.bold: true text: label opacity: textEdit.text == '' ? 1 : 0 - opacity: Behavior { + Behavior on opacity { NumberAnimation { property: "opacity" duration: 250 diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 6a427f4..b6cccb0 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 import "content" 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::PlaybackMode>(QMediaPlaylist::Linear)); + playbackModeBox->addItem(tr("Loop"), + QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Loop)); + playbackModeBox->addItem(tr("Random"), + QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Random)); + playbackModeBox->addItem(tr("Current Item Once"), + QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::CurrentItemOnce)); + playbackModeBox->addItem(tr("Current Item In Loop"), + QVariant::fromValue<QMediaPlaylist::PlaybackMode>(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<QMediaPlaylist::PlaybackMode>()); +} 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; 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/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp index 9693f3c..f2a1738 100644 --- a/demos/spreadsheet/spreadsheet.cpp +++ b/demos/spreadsheet/spreadsheet.cpp @@ -70,6 +70,7 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent) updateColor(0); setupMenuBar(); setupContents(); + setupContextMenu(); setCentralWidget(table); statusBar(); 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 013f1ce..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. @@ -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 * 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 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/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 1fd4dad..6cca39b 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -91,6 +91,7 @@ The following table lists the QML elements provided by the Qt Declarative module \o \l VisualDataModel \o \l Package \o \l XmlListModel and XmlRole +\o \l WorkerListModel \o \l DateTimeFormatter \o \l NumberFormatter \endlist @@ -102,6 +103,7 @@ The following table lists the QML elements provided by the Qt Declarative module \o \l Component \o \l Timer \o \l QtObject +\o \l WorkerScript \endlist \endtable diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index c718a6d..4b1c7d3 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -87,6 +87,82 @@ This function returns a Point with the specified \c x and \c y coordinates. This function returns as Size with the specified \c width and \c height. \section3 Qt.vector3d(real x, real y, real z) This function returns a Vector3D with the specified \c x, \c y and \c z. + +\section2 Formatters +The Qt object contains several functions for formatting dates and times. + +\section3 Qt.formatDate(datetime date, variant format) +This function returns the string representation of \c date, formatted according to \c format. +\section3 Qt.formatTime(datetime time, variant format) +This function returns the string representation of \c time, formatted according to \c format. +\section3 Qt.formatDateTime(datetime dateTime, variant format) +This function returns the string representation of \c dateTime, formatted according to \c format. + +\c format for the above formatting functions can be specified as follows. + + These expressions may be used for the date: + + \table + \header \i Expression \i Output + \row \i d \i the day as number without a leading zero (1 to 31) + \row \i dd \i the day as number with a leading zero (01 to 31) + \row \i ddd + \i the abbreviated localized day name (e.g. 'Mon' to 'Sun'). + Uses QDate::shortDayName(). + \row \i dddd + \i the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). + Uses QDate::longDayName(). + \row \i M \i the month as number without a leading zero (1-12) + \row \i MM \i the month as number with a leading zero (01-12) + \row \i MMM + \i the abbreviated localized month name (e.g. 'Jan' to 'Dec'). + Uses QDate::shortMonthName(). + \row \i MMMM + \i the long localized month name (e.g. 'January' to 'December'). + Uses QDate::longMonthName(). + \row \i yy \i the year as two digit number (00-99) + \row \i yyyy \i the year as four digit number + \endtable + + These expressions may be used for the time: + + \table + \header \i Expression \i Output + \row \i h + \i the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) + \row \i hh + \i the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) + \row \i m \i the minute without a leading zero (0 to 59) + \row \i mm \i the minute with a leading zero (00 to 59) + \row \i s \i the second without a leading zero (0 to 59) + \row \i ss \i the second with a leading zero (00 to 59) + \row \i z \i the milliseconds without leading zeroes (0 to 999) + \row \i zzz \i the milliseconds with leading zeroes (000 to 999) + \row \i AP + \i use AM/PM display. \e AP will be replaced by either "AM" or "PM". + \row \i ap + \i use am/pm display. \e ap will be replaced by either "am" or "pm". + \endtable + + All other input characters will be ignored. Any sequence of characters that + are enclosed in singlequotes will be treated as text and not be used as an + expression. Two consecutive singlequotes ("''") are replaced by a singlequote + in the output. + + Example format strings (assumed that the date and time is 21 May 2001 + 14:13:09): + + \table + \header \i Format \i Result + \row \i dd.MM.yyyy \i 21.05.2001 + \row \i ddd MMMM d yy \i Tue May 21 01 + \row \i hh:mm:ss.zzz \i 14:13:09.042 + \row \i h:m:s ap \i 2:13:9 pm + \endtable + +If no format is specified the locale's short format is used. Alternatively, you can specify +\c Qt.DefaultLocaleLongDate to get the locale's long format. + \section2 Functions The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML. @@ -119,9 +195,6 @@ while the following would rotate myItem clockwise from 350 degrees to 370 degree NumberAnimation { target: myItem; property: "rotation"; from: 350; to: Qt.closetAngle(350, 10) } \endqml -\section3 Qt.playSound(url soundLocation) -This function plays the audio file located at \c soundLocation. Only .wav files are supported. - \section3 Qt.openUrlExternally(url target) This function attempts to open the specified \c target url in an external application, based on the user's desktop preferences. It will return true if it succeeds, and false otherwise. diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 98efe12..310b776 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -173,10 +173,10 @@ In this case the rectangle will have the same size as its parent (see \l{anchor- \snippet examples/declarative/tutorials/helloworld/Cell.qml 3 -In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with +In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with the same size as its parent. -A \l MouseRegion defines a signal called \e clicked. +A \l MouseArea defines a signal called \e clicked. When this signal is triggered we want to emit our own \e clicked signal with the color as parameter. \section2 The main QML file @@ -214,7 +214,7 @@ Here is the QML code: \snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2 First, we create a new \e down state for our text element. -This state will be activated when the \l MouseRegion is pressed, and deactivated when it is released. +This state will be activated when the \l MouseArea is pressed, and deactivated when it is released. The \e down state includes a set of property changes from our implicit \e {default state} (the items as they were initially defined in the QML). diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc index 86920fd..505b65c 100644 --- a/doc/src/frameworks-technologies/containers.qdoc +++ b/doc/src/frameworks-technologies/containers.qdoc @@ -612,11 +612,14 @@ Qt automatically takes a copy of the container when it enters a \c foreach loop. If you modify the container as you are - iterating, that won't affect the loop. (If you don't modify the + iterating, that won't affect the loop. (If you do not modify the container, the copy still takes place, but thanks to \l{implicit - sharing} copying a container is very fast.) Similarly, declaring - the variable to be a non-const reference, in order to modify the - current item in the list will not work either. + sharing} copying a container is very fast.) + + Since foreach creates a copy of the container, using a non-const + reference for the variable does not allow you to modify the original + container. It only affects the copy, which is probably not what you + want. In addition to \c foreach, Qt also provides a \c forever pseudo-keyword for infinite loops: 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/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 <path to tslib library> -I <path to tslib headers> +.... +QMAKE_CFLAGS += -I<path to tslib headers> +QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library> +.... //! [7] 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<MyStruct>(); int id = qMetaTypeId<QString>(); // id is now QMetaType::QString id = qMetaTypeId<MyStruct>(); // compile error if MyStruct not declared //! [8] + +//! [9] +typedef QString CustomString; +qRegisterMetaType<CustomString>("CustomString"); +//! [9] diff --git a/doc/src/snippets/declarative/GroupBox.qml b/doc/src/snippets/declarative/GroupBox.qml deleted file mode 100644 index 6c5431e..0000000 --- a/doc/src/snippets/declarative/GroupBox.qml +++ /dev/null @@ -1,15 +0,0 @@ -import Qt 4.6 - -ContentWrapper { - id: container; width: parent.width; height: contents.height - children: [ - Rectangle { - width: parent.width; height: contents.height - color: "white"; pen.width: 2; pen.color: "#adaeb0"; radius: 10 - Column { - id: layout; width: parent.width; margin: 5; spacing: 2 - Content { } - } - } - ] -} diff --git a/doc/src/snippets/declarative/content.qml b/doc/src/snippets/declarative/content.qml deleted file mode 100644 index fb03ced..0000000 --- a/doc/src/snippets/declarative/content.qml +++ /dev/null @@ -1,9 +0,0 @@ -import Qt 4.6 - -Rectangle { - width: 200; height: 100; color: "lightgray" - GroupBox { - Text { text: "First Item" } - Text { text: "Second Item" } - } -} diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml index b016f9a..6a9d215 100644 --- a/doc/src/snippets/declarative/listview/highlight.qml +++ b/doc/src/snippets/declarative/listview/highlight.qml @@ -30,7 +30,7 @@ Rectangle { } ] transitions: [ - Transition { NumberAnimation { matchProperties: "x"; duration: 200 } } + Transition { NumberAnimation { properties: "x"; duration: 200 } } ] } } @@ -44,7 +44,7 @@ Rectangle { Rectangle { width: 180; height: 40 color: "lightsteelblue"; radius: 5 - y: SpringFollow { + SpringFollow on y { source: list.currentItem.y spring: 3 damping: 0.2 diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml index 79f8f8f..fc6c8f0 100644 --- a/doc/src/snippets/declarative/mouseregion.qml +++ b/doc/src/snippets/declarative/mouseregion.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { width: 200; height: 100 -HorizontalLayout { +Row { //! [0] Rectangle { width: 100; height: 100; color: "green" MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } } diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index 19a192c..99d0de2 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -13,7 +13,7 @@ Rectangle { opacity: PathView.opacity Column { Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { id: name; text: name; font.pointSize: 16} + Text { text: name; font.pointSize: 16} } } } diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index 5605139..e316578 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -11,7 +11,7 @@ Rectangle { width: 80; height: 80 Column { Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { id: name; text: name; font.pointSize: 16} + Text { text: name; font.pointSize: 16} } } } diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml index 7171a69..6740522 100644 --- a/examples/declarative/animations/color-animation.qml +++ b/examples/declarative/animations/color-animation.qml @@ -10,7 +10,7 @@ Item { gradient: Gradient { GradientStop { position: 0.0 - color: SequentialAnimation { + SequentialAnimation on color { repeat: true ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 } ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 } @@ -18,7 +18,7 @@ Item { } GradientStop { position: 1.0 - color: SequentialAnimation { + SequentialAnimation on color { repeat: true ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 } ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 } @@ -31,7 +31,7 @@ Item { Item { width: parent.width; height: 2 * parent.height transformOrigin: Item.Center - rotation: NumberAnimation { from: 0; to: 360; duration: 10000; repeat: true } + NumberAnimation on rotation { from: 0; to: 360; duration: 10000; repeat: true } Image { source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter transformOrigin: Item.Center; rotation: -3 * parent.rotation @@ -44,7 +44,7 @@ Item { x: 0; y: parent.height/2; width: parent.width; height: parent.height/2 source: "images/star.png"; angleDeviation: 360; velocity: 0 velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800 - opacity: SequentialAnimation { + SequentialAnimation on opacity { repeat: true NumberAnimation { from: 0; to: 1; duration: 5000 } NumberAnimation { from: 1; to: 0; duration: 5000 } @@ -58,7 +58,7 @@ Item { gradient: Gradient { GradientStop { position: 0.0 - color: SequentialAnimation { + SequentialAnimation on color { repeat: true ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 } ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 } diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml index 537ee26..4428f34 100644 --- a/examples/declarative/animations/property-animation.qml +++ b/examples/declarative/animations/property-animation.qml @@ -42,7 +42,7 @@ Item { // Animate the y property. Setting repeat to true makes the // animation repeat indefinitely, otherwise it would only run once. - y: SequentialAnimation { + SequentialAnimation on y { repeat: true // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml index 90ea516..79e99e9 100644 --- a/examples/declarative/aspectratio/face_fit_animated.qml +++ b/examples/declarative/aspectratio/face_fit_animated.qml @@ -18,7 +18,7 @@ Rectangle { source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 - scale: SpringFollow { + SpringFollow on scale { source: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height), Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333)) spring: 1 diff --git a/examples/declarative/behaviours/behavior.qml b/examples/declarative/behaviours/behavior.qml index 2732c0a..c84bf62 100644 --- a/examples/declarative/behaviours/behavior.qml +++ b/examples/declarative/behaviours/behavior.qml @@ -50,12 +50,12 @@ Rectangle { radius: 5 border.width: 10; border.color: "white"; x: 100-37; y: 100-25 - x: Behavior { NumberAnimation { duration: 300 } } - y: Behavior { NumberAnimation { duration: 300 } } + Behavior on x { NumberAnimation { duration: 300 } } + Behavior on y { NumberAnimation { duration: 300 } } Text { id: focusText text: focusRect.text; - text: Behavior { + Behavior on text { SequentialAnimation { NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 } PropertyAction {} diff --git a/examples/declarative/behaviours/test.qml b/examples/declarative/behaviours/test.qml deleted file mode 100644 index 8fffd59..0000000 --- a/examples/declarative/behaviours/test.qml +++ /dev/null @@ -1,102 +0,0 @@ -import Qt 4.6 - -Rectangle { - color: "lightsteelblue" - width: 800 - height: 600 - id: page - MouseArea { - anchors.fill: parent - onClicked: { bluerect.parent = page; console.log(mouseX); bluerect.x = mouseX; } - } - MyRect { - color: "green" - x: 200 - y: 200 - } - MyRect { - color: "red" - x: 400 - y: 200 - } - MyRect { - color: "yellow" - x: 400 - y: 400 - } - MyRect { - color: "orange" - x: 400 - y: 500 - } - MyRect { - color: "pink" - x: 400 - y: 0 - } - MyRect { - color: "lightsteelblue" - x: 100 - y: 500 - } - MyRect { - color: "black" - x: 0 - y: 200 - } - MyRect { - color: "white" - x: 400 - y: 0 - } - Rectangle { - color: "blue" - x: 0 - y: 0 - width: 100 - height: 100 - id: bluerect - x: Behavior { - ParallelAnimation { - SequentialAnimation { - NumberAnimation { - target: bluerect - property: "y" - from: 0 - to: 10 - easing.type: "OutBounce" - easing.amplitude: 30 - duration: 250 - } - NumberAnimation { - target: bluerect - property: "y" - from: 10 - to: 0 - easing.type: "OutBounce" - easing.amplitude: 30 - duration: 250 - } - } - NumberAnimation { duration: 500 } - } - } - parent: Behavior { - SequentialAnimation { - NumberAnimation { - target: bluerect - property: "opacity" - to: 0 - duration: 150 - } - PropertyAction {} - NumberAnimation { - target: bluerect - property: "opacity" - to: 1 - duration: 150 - } - } - } - } -} diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml index ca886e9..5621e18 100644 --- a/examples/declarative/border-image/content/MyBorderImage.qml +++ b/examples/declarative/border-image/content/MyBorderImage.qml @@ -17,13 +17,13 @@ Item { BorderImage { id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2 - width: SequentialAnimation { + SequentialAnimation on width { repeat: true NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"} NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" } } - height: SequentialAnimation { + SequentialAnimation on height { repeat: true NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"} NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" } diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml index 0c6836f..75a1cf5 100644 --- a/examples/declarative/clocks/content/Clock.qml +++ b/examples/declarative/clocks/content/Clock.qml @@ -34,7 +34,7 @@ Item { transform: Rotation { id: hourRotation origin.x: 7.5; origin.y: 73; angle: 0 - angle: SpringFollow { + SpringFollow on angle { spring: 2; damping: 0.2; modulus: 360 source: (clock.hours * 30) + (clock.minutes * 0.5) } @@ -48,7 +48,7 @@ Item { transform: Rotation { id: minuteRotation origin.x: 6.5; origin.y: 83; angle: 0 - angle: SpringFollow { + SpringFollow on angle { spring: 2; damping: 0.2; modulus: 360 source: clock.minutes * 6 } @@ -62,7 +62,7 @@ Item { transform: Rotation { id: secondRotation origin.x: 2.5; origin.y: 80; angle: 0 - angle: SpringFollow { + SpringFollow on angle { spring: 5; damping: 0.25; modulus: 360 source: clock.seconds * 6 } diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml new file mode 100644 index 0000000..421ae07 --- /dev/null +++ b/examples/declarative/colorbrowser/colorbrowser.qml @@ -0,0 +1,101 @@ +import Qt 4.6 +import 'qml' + +Rectangle { + id: mainWindow + width: 800; height: 480; color: '#454545' + + VisualDataModel { id: colorsVisualModel; delegate: colorsDelegate; model: ColorsModel } + + Component { + id: colorsDelegate + Package { + + Item { + Package.name: 'grid' + GridView { + id: gridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height + cellWidth: 160; cellHeight: 160; interactive: false + onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex) + } + } + + Item { + Package.name: 'fullscreen' + ListView { + id: listView; model: visualModel.parts.list; orientation: Qt.Horizontal + width: mainWindow.width; height: mainWindow.height; interactive: false + onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex) + highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem + } + } + + Item { + Package.name: 'stack' + id: wrapper + width: 260; height: 240 + + VisualDataModel { id: visualModel; model: colors; delegate: ColorDelegate {} } + + PathView { + id: pathView; model: visualModel.parts.stack; anchors.centerIn: parent + pathItemCount: 3 + path: Path { + PathAttribute { name: 'z'; value: 9999.0 } + PathLine { x: 1; y: 1 } + PathAttribute { name: 'z'; value: 0.0 } + } + } + + Item { + anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.bottomMargin: 20 + width: albumTitle.width + 20 ; height: albumTitle.height + 4 + Text { id: albumTitle; text: name; color: 'white'; font.bold: true; anchors.centerIn: parent } + } + + MouseArea { anchors.fill: parent; onClicked: wrapper.state = 'inGrid' } + + states: [ + State { + name: 'inGrid' + PropertyChanges { target: gridView; interactive: true } + PropertyChanges { target: shade; opacity: 1 } + }, + State { + name: 'fullscreen'; extend: 'inGrid' + PropertyChanges { target: gridView; interactive: false } + PropertyChanges { target: listView; interactive: true } + PropertyChanges { target: infobox; opacity: 1 } + } + ] + + transitions: [ + Transition { + from: ''; to: 'inGrid'; reversible: true + NumberAnimation { target: shade; properties: 'opacity'; duration: 300 } + }, + Transition { + from: 'inGrid'; to: 'fullscreen'; reversible: true + SequentialAnimation { + PauseAnimation { duration: 300 } + NumberAnimation { target: infobox; properties: 'opacity'; duration: 300 } + } + } + ] + } + } + } + + GridView { width: parent.width; height: parent.height; cellWidth: 260; cellHeight: 240; model: colorsVisualModel.parts.stack } + Rectangle { id: shade; color: '#454545'; width: parent.width; height: parent.height; opacity: 0 } + ListView { anchors.fill: parent; model: colorsVisualModel.parts.grid; interactive: false } + ListView { anchors.fill: parent; model: colorsVisualModel.parts.fullscreen; interactive: false } + Item { id: foreground; anchors.fill: parent } + + Column { + id: infobox; opacity: 0 + anchors { left: parent.left; leftMargin: 20; bottom: parent.bottom; bottomMargin: 20 } + Text { id: infoColorName; color: '#eeeeee'; style: Text.Outline; styleColor: '#222222'; font.pointSize: 18 } + Text { id: infoColorHex; color: '#eeeeee'; style: Text.Outline; styleColor: '#222222'; font.pointSize: 14 } + } +} diff --git a/examples/declarative/colorbrowser/dummydata/ColorsModel.qml b/examples/declarative/colorbrowser/dummydata/ColorsModel.qml new file mode 100644 index 0000000..eefbcfe --- /dev/null +++ b/examples/declarative/colorbrowser/dummydata/ColorsModel.qml @@ -0,0 +1,96 @@ +import Qt 4.6 + +ListModel { + id: colorsModel + + ListElement { + name: "Reds" + colors: [ + ListElement { name: "Fire Brick"; hex: "#B22222" }, + ListElement { name: "Fire Brick 1"; hex: "#FF3030" }, + ListElement { name: "Fire Brick 2"; hex: "#EE2C2C" }, + ListElement { name: "Fire Brick 3"; hex: "#CD2626" }, + ListElement { name: "Fire Brick 4"; hex: "#8B1A1A" }, + ListElement { name: "Red"; hex: "#FF0000" }, + ListElement { name: "Red 2"; hex: "#EE0000" }, + ListElement { name: "Red 3"; hex: "#CD0000" }, + ListElement { name: "Red 4"; hex: "#8B0000" }, + ListElement { name: "Tomato"; hex: "#FF6347" }, + ListElement { name: "Tomato 2"; hex: "#EE5C42" }, + ListElement { name: "Tomato 3"; hex: "#CD4F39" }, + ListElement { name: "Tomato 4"; hex: "#8B3626" }, + ListElement { name: "Orange Red"; hex: "#FF4500" }, + ListElement { name: "Orange Red 2"; hex: "#EE4000" }, + ListElement { name: "Orange Red 3"; hex: "#CD3700" }, + ListElement { name: "Orange Red 4"; hex: "#8B2500" }, + ListElement { name: "Indian Red 2"; hex: "#EE6363" }, + ListElement { name: "Indian Red 3"; hex: "#CD5555" }, + ListElement { name: "Indian Red 4"; hex: "#8B3A3A" }, + ListElement { name: "Brown"; hex: "#A52A2A" }, + ListElement { name: "Brown 1"; hex: "#FF4040" }, + ListElement { name: "Brown 2"; hex: "#EE3B3B" }, + ListElement { name: "Brown 3"; hex: "#CD3333" }, + ListElement { name: "Brown 4"; hex: "#8B2323" } + ] + } + ListElement { + name: "Greens" + colors: [ + ListElement { name: "Green"; hex: "#008000" }, + ListElement { name: "Green 2"; hex: "#00EE00" }, + ListElement { name: "Green 3"; hex: "#00CD00" }, + ListElement { name: "Green 4"; hex: "#008B00" }, + ListElement { name: "Dark Green"; hex: "#006400" }, + ListElement { name: "Sap Green"; hex: "#308014" }, + ListElement { name: "Medium Spring Green"; hex: "#00FA9A" }, + ListElement { name: "Spring Green"; hex: "#00FF7F" }, + ListElement { name: "Spring Green 1"; hex: "#00EE76" }, + ListElement { name: "Spring Green 2"; hex: "#00CD66" }, + ListElement { name: "Spring Green 3"; hex: "#008B45" }, + ListElement { name: "Medium Sea Green"; hex: "#3CB371" }, + ListElement { name: "Sea Green 1"; hex: "#54FF9F" }, + ListElement { name: "Sea Green 2"; hex: "#4EEE94" }, + ListElement { name: "Sea Green 3"; hex: "#43CD80" }, + ListElement { name: "Sea Green 4"; hex: "#2E8B57" }, + ListElement { name: "Emerald Green"; hex: "#00C957" }, + ListElement { name: "Mint"; hex: "#BDFCC9" }, + ListElement { name: "Cobalt Green"; hex: "#3D9140" }, + ListElement { name: "Dark Sea Green"; hex: "#8FBC8F" }, + ListElement { name: "Dark Sea Green 1"; hex: "#C1FFC1" }, + ListElement { name: "Dark Sea Green 2"; hex: "#B4EEB4" }, + ListElement { name: "Dark Sea Green 3"; hex: "#9BCD9B" }, + ListElement { name: "Dark Sea Green 4"; hex: "#698B69" }, + ListElement { name: "Lime Green"; hex: "#00FF00" } + ] + } + ListElement { + name: "Blues" + colors: [ + ListElement { name: "Dark Slate Blue"; hex: "#483D8B" }, + ListElement { name: "Light Slate Blue"; hex: "#8470FF" }, + ListElement { name: "Medium Slate Blue"; hex: "#7B68EE" }, + ListElement { name: "Slate Blue"; hex: "#6A5ACD" }, + ListElement { name: "Blue"; hex: "#0000FF" }, + ListElement { name: "Midnight Blue"; hex: "#191970" }, + ListElement { name: "Cobalt"; hex: "#3D59AB" }, + ListElement { name: "Royal Blue"; hex: "#4169E1" }, + ListElement { name: "Corn Flower Blue"; hex: "#6495ED" }, + ListElement { name: "Light Steel Blue"; hex: "#B0C4DE" }, + ListElement { name: "Light Steel Blue 1"; hex: "#CAE1FF" }, + ListElement { name: "Light Steel Blue 2"; hex: "#BCD2EE" }, + ListElement { name: "Light Steel Blue 3"; hex: "#A2B5CD" }, + ListElement { name: "Dodger Blue"; hex: "#1E90FF" }, + ListElement { name: "Dodger Blue 2"; hex: "#1C86EE" }, + ListElement { name: "Dodger Blue 3"; hex: "#1874CD" }, + ListElement { name: "Dodger Blue 4"; hex: "#104E8B" }, + ListElement { name: "Steel Blue"; hex: "#4682B4" }, + ListElement { name: "Light Sky Blue"; hex: "#87CEFA" }, + ListElement { name: "Sky Blue"; hex: "#87CEEB" }, + ListElement { name: "Peacock"; hex: "#33A1C9" }, + ListElement { name: "Light Blue"; hex: "#ADD8E6" }, + ListElement { name: "Powder Blue"; hex: "#B0E0E6" }, + ListElement { name: "Cadet Blue"; hex: "#5F9EA0" }, + ListElement { name: "Cyan"; hex: "#00FFFF" } + ] + } +} diff --git a/examples/declarative/colorbrowser/qml/ColorDelegate.qml b/examples/declarative/colorbrowser/qml/ColorDelegate.qml new file mode 100644 index 0000000..c123d12 --- /dev/null +++ b/examples/declarative/colorbrowser/qml/ColorDelegate.qml @@ -0,0 +1,114 @@ +import Qt 4.6 + +Package { + Item { id: stack; Package.name: 'stack'; width: 110; height: 110; z: stack.PathView.z } + Item { id: list; Package.name: 'list'; width: mainWindow.width + 4; height: 110 } + Item { id: grid; Package.name: 'grid'; width: 110; height: 110 } + + Item { + id: delegate + + property double randomAngle: Math.random() * (2 * 8 + 1) - 8 + property bool open: false + + width: 110; height: 110; z: stack.PathView.z + + Image { x: -6; y: -5; source: 'box-shadow.png'; smooth: true; } + Rectangle { color: hex; anchors.fill: parent; smooth: true } + Image { id: box; source: 'box.png'; smooth: true; anchors.fill: parent } + + Binding { + target: infoColorName; property: 'text' + value: name; when: delegate.open && list.ListView.isCurrentItem + } + + Binding { + target: infoColorHex; property: 'text' + value: hex; when: delegate.open && list.ListView.isCurrentItem + } + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton | Qt.LeftButton + onClicked: { + if (wrapper.state == 'inGrid' && mouse.button == Qt.RightButton) { + wrapper.state = '' + } else if (wrapper.state == 'inGrid') { + grid.GridView.view.currentIndex = index; + wrapper.state = 'fullscreen' + } else { + grid.GridView.view.currentIndex = index; + wrapper.state = 'inGrid' + } + } + } + + states: [ + State { + name: 'stacked'; when: wrapper.state == '' + ParentChange { target: delegate; parent: stack; x: 0; y: 0; rotation: delegate.randomAngle } + PropertyChanges { target: delegate; visible: stack.PathView.onPath ? 1.0 : 0.0 } + }, + State { + name: 'inGrid'; when: wrapper.state == 'inGrid' + ParentChange { target: delegate; parent: grid; x: 24; y: 24 } + PropertyChanges { target: delegate; open: true } + }, + State { + name: 'fullscreen'; when: wrapper.state == 'fullscreen' + ParentChange { target: delegate; parent: list; x: 0; y: 0; width: mainWindow.width; height: mainWindow.height } + PropertyChanges { target: box; opacity: 0 } + PropertyChanges { target: delegate; open: true } + } + ] + + transitions: [ + Transition { + from: 'stacked'; to: 'inGrid' + SequentialAnimation { + PauseAnimation { duration: 20 * index } + ParentAnimation { + target: delegate; via: foreground + NumberAnimation { targets: delegate; properties: 'x,y,width,height,rotation'; duration: 600; easing.type: 'OutBack' } + } + } + }, + Transition { + from: 'inGrid'; to: 'stacked' + ParentAnimation { + target: delegate; via: foreground + NumberAnimation { properties: 'x,y,width,height,rotation'; duration: 300; easing.type: 'InOutQuad' } + } + }, + Transition { + from: 'inGrid'; to: 'fullscreen' + SequentialAnimation { + PauseAnimation { duration: grid.GridView.isCurrentItem ? 0 : 300 } + ParentAnimation { + target: delegate; via: foreground + NumberAnimation { + properties: 'x,y,width,height,opacity' + duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad' + } + } + } + }, + Transition { + from: 'fullscreen'; to: 'inGrid' + SequentialAnimation { + PauseAnimation { duration: grid.GridView.isCurrentItem ? 3 : 0 } + ParallelAnimation { + ParentAnimation { + target: delegate; via: foreground + NumberAnimation { + properties: 'x,y,width,height' + duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad' + } + } + NumberAnimation { properties: 'opacity'; duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad' } + } + } + } + ] + } +} diff --git a/examples/declarative/colorbrowser/qml/box-shadow.png b/examples/declarative/colorbrowser/qml/box-shadow.png Binary files differnew file mode 100644 index 0000000..3281a37 --- /dev/null +++ b/examples/declarative/colorbrowser/qml/box-shadow.png diff --git a/examples/declarative/colorbrowser/qml/box.png b/examples/declarative/colorbrowser/qml/box.png Binary files differnew file mode 100644 index 0000000..86538aa --- /dev/null +++ b/examples/declarative/colorbrowser/qml/box.png diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml index 4692343..c35bda5 100644 --- a/examples/declarative/connections/connections.qml +++ b/examples/declarative/connections/connections.qml @@ -10,7 +10,7 @@ Rectangle { Image { id: image; source: "content/bg1.jpg"; anchors.centerIn: parent; transformOrigin: Item.Center rotation: window.angle - rotation: Behavior { NumberAnimation { easing.type: "OutCubic"; duration: 300 } } + Behavior on rotation { NumberAnimation { easing.type: "OutCubic"; duration: 300 } } } Button { diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml index 6fd0f39..ad4717a 100644 --- a/examples/declarative/dial/content/Dial.qml +++ b/examples/declarative/dial/content/Dial.qml @@ -26,7 +26,7 @@ Item { id: needleRotation origin.x: 7; origin.y: 65 angle: -130 - angle: SpringFollow { + SpringFollow on angle { spring: 1.4 damping: .15 source: Math.min(Math.max(-130, root.value*2.6 - 130), 133) diff --git a/examples/declarative/dynamic/qml/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml index 796a370..81b6e9b 100644 --- a/examples/declarative/dynamic/qml/Sun.qml +++ b/examples/declarative/dynamic/qml/Sun.qml @@ -11,14 +11,14 @@ Image { //x and y get set when instantiated //head offscreen - y: NumberAnimation { - to: parent.height; - duration: 10000; + NumberAnimation on y { + to: window.height / 2; running: created + onRunningChanged: if (running) duration = (window.height - sun.y) * 10; else state = "OffScreen"; } states: State { - name: "OffScreen"; when: created && y > window.height / 2;//Below the ground + name: "OffScreen"; StateChangeScript { script: { sun.created = false; sun.destroy() } } } } diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml index 0674433..997d7de 100644 --- a/examples/declarative/effects/effects.qml +++ b/examples/declarative/effects/effects.qml @@ -11,7 +11,7 @@ Rectangle { source: "pic.png" effect: Blur { - blurRadius: NumberAnimation { + NumberAnimation on blurRadius { id: blurEffect running: false from: 0; to: 10 @@ -33,7 +33,7 @@ Rectangle { effect: DropShadow { blurRadius: 3 offset.x: 3 - offset.y: NumberAnimation { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; } + NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; } } MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running } diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml index ec3717f..ab0f81c 100644 --- a/examples/declarative/fillmode/fillmode.qml +++ b/examples/declarative/fillmode/fillmode.qml @@ -4,7 +4,7 @@ Image { width: 400 height: 250 source: "face.png" - fillMode: SequentialAnimation { + SequentialAnimation on fillMode { repeat: true PropertyAction { value: Image.Stretch } PropertyAction { target: label; property: "text"; value: "Stretch" } diff --git a/examples/declarative/focusscope/test5.qml b/examples/declarative/focusscope/test5.qml new file mode 100644 index 0000000..da98350 --- /dev/null +++ b/examples/declarative/focusscope/test5.qml @@ -0,0 +1,83 @@ +import Qt 4.6 + +Rectangle { + color: "white" + width: 800 + height: 600 + + Keys.onReturnPressed: console.log("Error - Root") + + FocusScope { + id: myScope + focus: true + + Keys.onReturnPressed: console.log("Error - FocusScope") + + Rectangle { + height: 120 + width: 420 + + color: "transparent" + border.width: 5 + border.color: myScope.wantsFocus?"blue":"black" + + Rectangle { + x: 10; y: 10 + width: 100; height: 100; color: "green" + border.width: 5 + border.color: item1.wantsFocus?"blue":"black" + } + + TextEdit { + id: item1 + x: 20; y: 20 + width: 90; height: 90 + color: "white" + font.pixelSize: 20 + Keys.onReturnPressed: console.log("Top Left"); + KeyNavigation.right: item2 + focus: true + wrap: true + text: "Box 1" + } + + Rectangle { + id: item2 + x: 310; y: 10 + width: 100; height: 100; color: "green" + border.width: 5 + border.color: wantsFocus?"blue":"black" + KeyNavigation.left: item1 + Keys.onReturnPressed: console.log("Top Right"); + + Rectangle { + width: 50; height: 50; anchors.centerIn: parent + color: parent.focus?"red":"transparent" + } + } + } + KeyNavigation.down: item3 + } + + Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box or flashing cursor indicates active focus\nUse arrow keys to navigate\nPress Ctrl-Return to print currently focused item" } + + Rectangle { + x: 10; y: 300 + width: 100; height: 100; color: "green" + border.width: 5 + border.color: item3.wantsFocus?"blue":"black" + } + + TextEdit { + id: item3 + x: 20; y: 310 + width: 90; height: 90 + color: "white" + font.pixelSize: 20 + text: "Box 3" + + Keys.onReturnPressed: console.log("Bottom Left"); + KeyNavigation.up: myScope + wrap: true + } +} diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml index 00b8660..7989f80 100644 --- a/examples/declarative/fonts/banner.qml +++ b/examples/declarative/fonts/banner.qml @@ -10,7 +10,7 @@ Rectangle { Row { y: -screen.height / 4.5 - x: NumberAnimation { from: 0; to: -text.width; duration: 6000; repeat: true } + NumberAnimation on x { from: 0; to: -text.width; duration: 6000; repeat: true } Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml index fcc9580..334409e 100644 --- a/examples/declarative/fonts/hello.qml +++ b/examples/declarative/fonts/hello.qml @@ -9,7 +9,7 @@ Rectangle { id: text; color: "white"; anchors.centerIn: parent text: "Hello world!"; font.pixelSize: 60 - font.letterSpacing: SequentialAnimation { + SequentialAnimation on font.letterSpacing { repeat: true; NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 } ScriptAction { script: { @@ -17,7 +17,7 @@ Rectangle { container.x = (screen.width / 4) + (Math.random() * screen.width / 2) } } } - opacity: SequentialAnimation { + SequentialAnimation on opacity { repeat: true; NumberAnimation { from: 1; to: 0; duration: 2600 } PauseAnimation { duration: 400 } diff --git a/examples/declarative/imageprovider/ImageProviderCore/qmldir b/examples/declarative/imageprovider/ImageProviderCore/qmldir new file mode 100644 index 0000000..1028590 --- /dev/null +++ b/examples/declarative/imageprovider/ImageProviderCore/qmldir @@ -0,0 +1,2 @@ +plugin imageprovider + diff --git a/examples/declarative/imageprovider/main.cpp b/examples/declarative/imageprovider/imageprovider.cpp index d9d4c1a..253dbf5 100644 --- a/examples/declarative/imageprovider/main.cpp +++ b/examples/declarative/imageprovider/imageprovider.cpp @@ -39,7 +39,8 @@ ** ****************************************************************************/ -#include <QApplication> + +#include <qdeclarativeextensionplugin.h> #include <qdeclarativeengine.h> #include <qdeclarativecontext.h> @@ -70,29 +71,37 @@ public: } }; -int main(int argc, char ** argv) + +class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin { - QApplication app(argc, argv); + Q_OBJECT +public: + void registerTypes(const char *uri) { + Q_UNUSED(uri); + + } - QDeclarativeView view; + void initializeEngine(QDeclarativeEngine *engine, const char *uri) { + Q_UNUSED(uri); - view.engine()->addImageProvider("colors", new ColorImageProvider); + engine->addImageProvider("colors", new ColorImageProvider); - QStringList dataList; - dataList.append("image://colors/red"); - dataList.append("image://colors/green"); - dataList.append("image://colors/blue"); - dataList.append("image://colors/brown"); - dataList.append("image://colors/orange"); - dataList.append("image://colors/purple"); - dataList.append("image://colors/yellow"); + QStringList dataList; + dataList.append("image://colors/red"); + dataList.append("image://colors/green"); + dataList.append("image://colors/blue"); + dataList.append("image://colors/brown"); + dataList.append("image://colors/orange"); + dataList.append("image://colors/purple"); + dataList.append("image://colors/yellow"); - QDeclarativeContext *ctxt = view.rootContext(); - ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); + QDeclarativeContext *ctxt = engine->rootContext(); + ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); + } - view.setSource(QUrl("qrc:view.qml")); - view.show(); +}; + +#include "imageprovider.moc" + +Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin); - return app.exec(); -} -//![0] diff --git a/examples/declarative/imageprovider/imageprovider.pro b/examples/declarative/imageprovider/imageprovider.pro index 60423ab..e403bf8 100644 --- a/examples/declarative/imageprovider/imageprovider.pro +++ b/examples/declarative/imageprovider/imageprovider.pro @@ -1,9 +1,11 @@ -TEMPLATE = app -TARGET = imageprovider -DEPENDPATH += . -INCLUDEPATH += . +TEMPLATE = lib +TARGET = imageprovider QT += declarative +CONFIG += qt plugin + +TARGET = $$qtLibraryTarget($$TARGET) +DESTDIR = ImageProviderCore # Input -SOURCES += main.cpp -RESOURCES += imageprovider.qrc +SOURCES += imageprovider.cpp + diff --git a/examples/declarative/imageprovider/view.qml b/examples/declarative/imageprovider/imageprovider.qml index 2ab729d..f899b1e 100644 --- a/examples/declarative/imageprovider/view.qml +++ b/examples/declarative/imageprovider/imageprovider.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import "ImageProviderCore" //![0] ListView { width: 100 diff --git a/examples/declarative/imageprovider/imageprovider.qrc b/examples/declarative/imageprovider/imageprovider.qrc deleted file mode 100644 index 17e9301..0000000 --- a/examples/declarative/imageprovider/imageprovider.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource> - <file>view.qml</file> -</qresource> -</RCC> diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml index accd969..4b2a3f8 100644 --- a/examples/declarative/layouts/layouts.qml +++ b/examples/declarative/layouts/layouts.qml @@ -1,5 +1,5 @@ import Qt 4.6 - +import Qt.widgets 4.6 Item { id: resizable width:400 diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml index 7146702..bce53bd 100644 --- a/examples/declarative/layouts/positioners.qml +++ b/examples/declarative/layouts/positioners.qml @@ -21,11 +21,11 @@ Rectangle { } Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueV1; color: "lightsteelblue"; width: 100; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueV2; color: "lightsteelblue"; width: 100; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 } } @@ -45,11 +45,11 @@ Rectangle { } Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } Rectangle { id: blueH1; color: "lightsteelblue"; width: 50; height: 100; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 } Rectangle { id: blueH2; color: "lightsteelblue"; width: 50; height: 100; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 } } @@ -113,15 +113,15 @@ Rectangle { Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueG1; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueG2; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueG3; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } @@ -147,15 +147,15 @@ Rectangle { } Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueF1; color: "lightsteelblue"; width: 60; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueF2; color: "lightsteelblue"; width: 60; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } Rectangle { id: blueF3; color: "lightsteelblue"; width: 40; height: 50; border.color: "black"; radius: 15 - opacity: Behavior{NumberAnimation{}} + Behavior on opacity {NumberAnimation{}} } Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } } diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml index 0850f4e..5240e65 100644 --- a/examples/declarative/listview/content/ClickAutoRepeating.qml +++ b/examples/declarative/listview/content/ClickAutoRepeating.qml @@ -10,7 +10,7 @@ Item { signal released signal clicked - isPressed: SequentialAnimation { + SequentialAnimation on isPressed { running: false id: autoRepeat PropertyAction { target: page; property: "isPressed"; value: true } diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index be1f62d..5e4911d 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -44,7 +44,7 @@ Rectangle { id: petHighlight Rectangle { width: 200; height: 50; color: "#FFFF88" - y: SpringFollow { source: list1.currentItem.y; spring: 3; damping: 0.1 } + SpringFollow on y { source: list1.currentItem.y; spring: 3; damping: 0.1 } } } ListView { diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/package/Delegate.qml index 4109633..f35314f 100644 --- a/examples/declarative/package/Delegate.qml +++ b/examples/declarative/package/Delegate.qml @@ -2,24 +2,26 @@ import Qt 4.6 //![0] Package { - Text { id: listDelegate; width: 200; height: 25; text: "Empty"; Package.name: "list" } - Text { id: gridDelegate; width: 100; height: 50; text: "Empty"; Package.name: "grid" } + Text { id: listDelegate; width: 200; height: 25; text: 'Empty'; Package.name: 'list' } + Text { id: gridDelegate; width: 100; height: 50; text: 'Empty'; Package.name: 'grid' } Rectangle { id: wrapper width: 200; height: 25 - color: "lightsteelblue" + color: 'lightsteelblue' + Text { text: display; anchors.centerIn: parent } - MouseRegion { + MouseArea { anchors.fill: parent onClicked: { - if (wrapper.state == "inList") - wrapper.state = "inGrid"; + if (wrapper.state == 'inList') + wrapper.state = 'inGrid'; else - wrapper.state = "inList"; + wrapper.state = 'inList'; } } - state: "inList" + + state: 'inList' states: [ State { name: 'inList' @@ -27,15 +29,17 @@ Package { }, State { name: 'inGrid' - ParentChange { target: wrapper; parent: gridDelegate } - PropertyChanges { target: wrapper; x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height } + ParentChange { + target: wrapper; parent: gridDelegate + x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height + } } ] + transitions: [ Transition { - SequentialAnimation { - ParentAction { target: wrapper } - NumberAnimation { targets: wrapper; properties: 'x,y,width,height'; duration: 300 } + ParentAnimation { + NumberAnimation { properties: 'x,y,width,height'; duration: 300 } } } ] diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml index 5e58100..08193ae 100644 --- a/examples/declarative/parallax/qml/ParallaxView.qml +++ b/examples/declarative/parallax/qml/ParallaxView.qml @@ -25,6 +25,7 @@ Item { anchors.fill: parent model: VisualItemModel { id: visualModel } + highlightRangeMode: ListView.StrictlyEnforceRange snapMode: ListView.SnapOneItem } diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml index 81eadda..4442d5e 100644 --- a/examples/declarative/parallax/qml/Smiley.qml +++ b/examples/declarative/parallax/qml/Smiley.qml @@ -24,7 +24,7 @@ Item { // Animate the y property. Setting repeat to true makes the // animation repeat indefinitely, otherwise it would only run once. - y: SequentialAnimation { + SequentialAnimation on y { repeat: true // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function diff --git a/examples/declarative/progressbar/content/ProgressBar.qml b/examples/declarative/progressbar/content/ProgressBar.qml index bfc801c..65c80b2 100644 --- a/examples/declarative/progressbar/content/ProgressBar.qml +++ b/examples/declarative/progressbar/content/ProgressBar.qml @@ -21,7 +21,7 @@ Item { id: highlight; radius: 1 anchors.left: parent.left; anchors.top: parent.top; anchors.bottom: parent.bottom anchors.leftMargin: 3; anchors.topMargin: 3; anchors.bottomMargin: 3 - width: EaseFollow { source: highlight.widthDest; velocity: 1200 } + EaseFollow on width { source: highlight.widthDest; velocity: 1200 } gradient: Gradient { GradientStop { id: g1; position: 0.0 } GradientStop { id: g2; position: 1.0 } diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/progressbar/progressbars.qml index 6530c3d..a66d544 100644 --- a/examples/declarative/progressbar/progressbars.qml +++ b/examples/declarative/progressbar/progressbars.qml @@ -14,9 +14,9 @@ Rectangle { ProgressBar { property int r: Math.floor(Math.random() * 5000 + 1000) width: main.width - 20 - value: NumberAnimation { duration: r; from: 0; to: 100; repeat: true } - color: ColorAnimation { duration: r; from: "lightsteelblue"; to: "thistle"; repeat: true } - secondColor: ColorAnimation { duration: r; from: "steelblue"; to: "#CD96CD"; repeat: true } + NumberAnimation on value { duration: r; from: 0; to: 100; repeat: true } + ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; repeat: true } + ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; repeat: true } } } } diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml deleted file mode 100644 index c2a2674..0000000 --- a/examples/declarative/snow/ImageBatch.qml +++ /dev/null @@ -1,72 +0,0 @@ -import Qt 4.6 - -GridView { - id: grid - property int offset: 0 - property var ref - property bool isSelected: ref.selectedItemColumn >= offset && ref.selectedItemColumn < offset + 5 - - currentIndex: (ref.selectedItemColumn - offset) + ref.selectedItemRow * 5 - - property int imageWidth: ref.imageWidth - property int imageHeight: ref.imageHeight - - width: 5 * imageWidth - height: 4 * imageHeight - cellWidth: imageWidth - cellHeight: imageHeight - - states: State { - name: "selected"; when: grid.isSelected - PropertyChanges { target: grid; z: 150 } - } - transitions: Transition { - SequentialAnimation { - PauseAnimation { duration: 150 } - PropertyAction { properties: "z" } - } - } - model: XmlListModel { - property string tags : "" - source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2" - query: "/rss/channel/item" - namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" - - XmlRole { name: "url"; query: "media:content/@url/string()" } - } - - delegate: Item { - id: root - property bool isSelected: GridView.isCurrentItem && grid.isSelected - transformOrigin: Item.Center - width: grid.imageWidth; height: grid.imageHeight; - - Image { id: flickrImage; source: url; fillMode: Image.PreserveAspectFit; smooth: true; anchors.fill: parent; - opacity: (status == Image.Ready)?1:0; opacity: Behavior { NumberAnimation { } } } - Loading { anchors.centerIn: parent; visible: flickrImage.status!=1 } - - states: State { - name: "selected" - when: root.isSelected - PropertyChanges { target: root; scale: 3; z: 100 } - } - transitions: [ - Transition { - to: "selected" - SequentialAnimation { - PauseAnimation { duration: 150 } - PropertyAction { properties: "z" } - NumberAnimation { properties: "scale"; duration: 150; } - } - }, - Transition { - from: "selected" - SequentialAnimation { - NumberAnimation { properties: "scale"; duration: 150 } - PropertyAction { properties: "z" } - } - } - ] - } -} - diff --git a/examples/declarative/snow/Loading.qml b/examples/declarative/snow/Loading.qml deleted file mode 100644 index 238d9c7..0000000 --- a/examples/declarative/snow/Loading.qml +++ /dev/null @@ -1,8 +0,0 @@ -import Qt 4.6 - -Image { - id: loading; source: "pics/loading.png"; transformOrigin: Item.Center - rotation: NumberAnimation { - id: rotationAnimation; from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900 - } -} diff --git a/examples/declarative/snow/create.js b/examples/declarative/snow/create.js deleted file mode 100644 index 2bdae4a..0000000 --- a/examples/declarative/snow/create.js +++ /dev/null @@ -1,12 +0,0 @@ -var myComponent = null; - -function createNewBlock() { - if (myComponent == null) - myComponent = createComponent("ImageBatch.qml"); - - var obj = myComponent.createObject(); - obj.parent = layout; - obj.offset = maximumColumn + 1; - obj.ref = imagePanel; - maximumColumn += 5; -} diff --git a/examples/declarative/snow/pics/loading.png b/examples/declarative/snow/pics/loading.png Binary files differdeleted file mode 100644 index 0296cfe..0000000 --- a/examples/declarative/snow/pics/loading.png +++ /dev/null diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml deleted file mode 100644 index 39c9c43..0000000 --- a/examples/declarative/snow/snow.qml +++ /dev/null @@ -1,69 +0,0 @@ -import Qt 4.6 - -Rectangle { - id: imagePanel - width: 1024 - height: 768 - color: "black" - - property int maximumColumn: 4 - property int selectedItemRow: 0 - property int selectedItemColumn: 0 - - Script { source: "create.js" } - - onSelectedItemColumnChanged: if (selectedItemColumn == maximumColumn) createNewBlock(); - - property int imageWidth: 200 - property int imageHeight: 200 - - property int selectedX: selectedItemColumn * imageWidth - property int selectedY: selectedItemRow * imageHeight - - Item { - anchors.centerIn: parent - Row { - id: layout - property real targetX: -(selectedX + imageWidth / 2) - - property real targetDeform: 0 - property bool slowDeform: true - - property real deform: 0 - deform: SpringFollow { - id: deformFollow; source: layout.targetDeform; velocity: layout.slowDeform?0.1:2 - onSyncChanged: if(inSync) { layout.slowDeform = true; layout.targetDeform = 0; } - } - - ImageBatch { offset: 0; ref: imagePanel } - - x: SpringFollow { source: layout.targetX; velocity: 1000 } - y: SpringFollow { source: -(selectedY + imageHeight / 2); velocity: 500 } - } - - transform: Rotation { - axis.y: 1; axis.z: 0 - angle: layout.deform * -100 - } - } - - Script { - function left() { - if (selectedItemColumn <= 0) return; - selectedItemColumn -= 1; - layout.slowDeform = false; - layout.targetDeform = Math.max(Math.min(layout.deform - 0.1, -0.1), -0.4); - } - function right() { - selectedItemColumn += 1; - layout.slowDeform = false; - layout.targetDeform = Math.min(Math.max(layout.deform + 0.1, 0.1), 0.4); - } - } - - focus: true - Keys.onLeftPressed: "left()" - Keys.onRightPressed: "right()" - Keys.onUpPressed: "if (selectedItemRow > 0) selectedItemRow = selectedItemRow - 1" - Keys.onDownPressed: "if (selectedItemRow < 3) selectedItemRow = selectedItemRow + 1" -} diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index 9d35832..36178ec 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -14,7 +14,7 @@ Rectangle { signal closed(); color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 - opacity: Behavior { + Behavior on opacity { NumberAnimation { duration: 1000 } } Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml index 85c2c93..9ef455a 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -8,8 +8,8 @@ Item { id:block property int targetX: 0 property int targetY: 0 - x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } - y: SpringFollow { source: targetY; spring: 2; damping: 0.2 } + SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } + SpringFollow on y { source: targetY; spring: 2; damping: 0.2 } //![1] //![2] @@ -24,7 +24,7 @@ Item { id:block } } opacity: 0 - opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } } + Behavior on opacity { NumberAnimation { properties:"opacity"; duration: 200 } } anchors.fill: parent } //![2] diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index ed9fd32..831c03b 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -13,7 +13,7 @@ Rectangle { signal closed(); color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 - opacity: Behavior { + Behavior on opacity { NumberAnimation { duration: 1000 } } Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml index 4bd5319..6022a15 100644 --- a/examples/declarative/tvtennis/tvtennis.qml +++ b/examples/declarative/tvtennis/tvtennis.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import Qt.multimedia 4.7 Rectangle { id: page @@ -15,27 +16,30 @@ Rectangle { color: "Lime" x: 20; width: 20; height: 20; z: 1 + SoundEffect { id: paddle; source: "paddle.wav" } + SoundEffect { id: wall; source: "click.wav" } + // Move the ball to the right and back to the left repeatedly - x: SequentialAnimation { + SequentialAnimation on x { repeat: true NumberAnimation { to: page.width - 40; duration: 2000 } - ScriptAction { script: Qt.playSound('paddle.wav') } + ScriptAction { script: paddle.play() } PropertyAction { target: ball; property: "direction"; value: "left" } NumberAnimation { to: 20; duration: 2000 } - ScriptAction { script: Qt.playSound('paddle.wav') } + ScriptAction { script: paddle.play() } PropertyAction { target: ball; property: "direction"; value: "right" } } // Make y follow the target y coordinate, with a velocity of 200 - y: SpringFollow { source: ball.targetY; velocity: 200 } + SpringFollow on y { source: ball.targetY; velocity: 200 } // Detect the ball hitting the top or bottom of the view and bounce it onYChanged: { if (y <= 0) { - Qt.playSound('click.wav'); + wall.play(); targetY = page.height - 20; } else if (y >= page.height - 20) { - Qt.playSound('click.wav'); + wall.play(); targetY = 0; } } @@ -47,7 +51,7 @@ Rectangle { id: leftBat color: "Lime" x: 2; width: 20; height: 90 - y: SpringFollow { + SpringFollow on y { source: ball.y - 45; velocity: 300 enabled: ball.direction == 'left' } @@ -56,7 +60,7 @@ Rectangle { id: rightBat color: "Lime" x: page.width - 22; width: 20; height: 90 - y: SpringFollow { + SpringFollow on y { source: ball.y-45; velocity: 300 enabled: ball.direction == 'right' } diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml index c39f99b..7424f60 100644 --- a/examples/declarative/velocity/Day.qml +++ b/examples/declarative/velocity/Day.qml @@ -24,7 +24,7 @@ Rectangle { id: stickyPage x: Math.random() * 200 + 100 y: Math.random() * 300 + 50 - rotation: SpringFollow { + SpringFollow on rotation { source: -flickable.horizontalVelocity / 100 spring: 2.0; damping: 0.1 } diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml index 74c6844..3c00ee6 100644 --- a/examples/declarative/webview/autosize.qml +++ b/examples/declarative/webview/autosize.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // The WebView size is determined by the width, height, // preferredWidth, and preferredHeight properties. diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/webview/content/FieldText.qml index 19b6acc..d282209 100644 --- a/examples/declarative/webview/content/FieldText.qml +++ b/examples/declarative/webview/content/FieldText.qml @@ -85,7 +85,7 @@ Item { font.bold: true text: label opacity: textEdit.text == '' ? 1 : 0 - opacity: Behavior { + Behavior on opacity { NumberAnimation { property: "opacity" duration: 250 diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml index 2e98940..6c3b021 100644 --- a/examples/declarative/webview/content/Mapping/Map.qml +++ b/examples/declarative/webview/content/Mapping/Map.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Item { id: page diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml index 94301cd..d219d84 100644 --- a/examples/declarative/webview/evalandattach.qml +++ b/examples/declarative/webview/evalandattach.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Item { height: 640 diff --git a/examples/declarative/webview/googleMaps.qml b/examples/declarative/webview/googleMaps.qml index 1886961..a04fecb 100644 --- a/examples/declarative/webview/googleMaps.qml +++ b/examples/declarative/webview/googleMaps.qml @@ -6,6 +6,7 @@ // order to create a Map. import Qt 4.6 +import org.webkit 1.0 import "content/Mapping" Map { diff --git a/examples/declarative/webview/inline-html.qml b/examples/declarative/webview/inline-html.qml index 23b4555..41dfec3 100644 --- a/examples/declarative/webview/inline-html.qml +++ b/examples/declarative/webview/inline-html.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // Inline HTML with loose formatting can be // set on the html property. diff --git a/examples/declarative/webview/newwindows.qml b/examples/declarative/webview/newwindows.qml index 5dd4cd5..c62aba6 100644 --- a/examples/declarative/webview/newwindows.qml +++ b/examples/declarative/webview/newwindows.qml @@ -4,6 +4,7 @@ // allow it on WebView with settings.javascriptCanOpenWindows: true import Qt 4.6 +import org.webkit 1.0 Grid { columns: 3 diff --git a/examples/declarative/webview/qdeclarative-in-html.qml b/examples/declarative/webview/qdeclarative-in-html.qml index 77180ec..172ea4b 100644 --- a/examples/declarative/webview/qdeclarative-in-html.qml +++ b/examples/declarative/webview/qdeclarative-in-html.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // The WebView supports QML data through the HTML OBJECT tag Rectangle { diff --git a/examples/declarative/webview/transparent.qml b/examples/declarative/webview/transparent.qml index 9332f3e..5530819 100644 --- a/examples/declarative/webview/transparent.qml +++ b/examples/declarative/webview/transparent.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // The WebView background is transparent // if the HTML does not specify a background diff --git a/examples/declarative/workerlistmodel/dataloader.js b/examples/declarative/workerlistmodel/dataloader.js new file mode 100644 index 0000000..eac7478 --- /dev/null +++ b/examples/declarative/workerlistmodel/dataloader.js @@ -0,0 +1,14 @@ +// ![0] +WorkerScript.onMessage = function(msg) { + console.log("Worker told to", msg.action); + + if (msg.action == 'appendCurrentTime') { + var data = {'time': new Date().toTimeString()}; + msg.model.append(data); + msg.model.sync(); // updates the changes to the list + + var msgToSend = {'msg': 'Model updated!'}; + WorkerScript.sendMessage(msgToSend); + } +} +// ![0] diff --git a/examples/declarative/workerlistmodel/timedisplay.qml b/examples/declarative/workerlistmodel/timedisplay.qml new file mode 100644 index 0000000..3bf2630 --- /dev/null +++ b/examples/declarative/workerlistmodel/timedisplay.qml @@ -0,0 +1,33 @@ +// ![0] +import Qt 4.6 + +ListView { + width: 200 + height: 300 + + model: listModel + delegate: Component { + Text { text: time } + } + + WorkerListModel { id: listModel } + + WorkerScript { + id: worker + source: "dataloader.js" + onMessage: { + console.log("Worker said", messageObject.msg); + } + } + + Timer { + id: timer + interval: 2000; repeat: true; running: true; triggeredOnStart: true + + onTriggered: { + var msg = {'action': 'appendCurrentTime', 'model': listModel}; + worker.sendMessage(msg); + } + } +} +// ![0] 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/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp index 59b297a..5b39159 100644 --- a/examples/tutorials/addressbook/part3/addressbook.cpp +++ b/examples/tutorials/addressbook/part3/addressbook.cpp @@ -91,7 +91,7 @@ AddressBook::AddressBook(QWidget *parent) mainLayout->addWidget(addressText, 1, 1); mainLayout->addLayout(buttonLayout1, 1, 2); //! [adding navigation layout] - mainLayout->addLayout(buttonLayout2, 3, 1); + mainLayout->addLayout(buttonLayout2, 2, 1); //! [adding navigation layout] setLayout(mainLayout); setWindowTitle(tr("Simple Address Book")); diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp index e4e451f..a4bf459 100644 --- a/examples/tutorials/addressbook/part4/addressbook.cpp +++ b/examples/tutorials/addressbook/part4/addressbook.cpp @@ -100,7 +100,7 @@ AddressBook::AddressBook(QWidget *parent) mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop); mainLayout->addWidget(addressText, 1, 1); mainLayout->addLayout(buttonLayout1, 1, 2); - mainLayout->addLayout(buttonLayout2, 3, 1); + mainLayout->addLayout(buttonLayout2, 2, 1); setLayout(mainLayout); setWindowTitle(tr("Simple Address Book")); 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 = 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, QList<MakefileGenerator::SubT t << "MAKEFILE = " << ofile << endl; /* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires * back-slashes to be turned into slashes. */ - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; t << "MKDIR = " << var("QMAKE_MKDIR") << endl; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 42031b9..f90421b 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -200,7 +200,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << endl; t << "MAKEFILE = " << wrapperFile.fileName() << endl; - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 4391a64..79663fb 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -144,7 +144,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "# ==============================================================================" << "\n" << endl; t << endl; t << "MAKEFILE = " << wrapperFile.fileName() << endl; - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index b2f0db1..f85d707 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -99,8 +99,6 @@ UnixMakefileGenerator::init() MakefileGenerator::init(); if(project->isEmpty("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") : 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 diff --git a/qmake/project.cpp b/qmake/project.cpp index 951ca33..9e6db10 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3136,11 +3136,11 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList } } else if (var == QLatin1String("QMAKE_QMAKE")) { if (place[var].isEmpty()) { - var = ".BUILTIN." + var; if (!Option::qmake_abslocation.isNull()) place[var] = QStringList(Option::qmake_abslocation); else - place[var] = QStringList("qmake"); + place[var] = QStringList(Option::fixPathToTargetOS( + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake", false)); } } else if (var == QLatin1String("EPOCROOT")) { if (place[var].isEmpty()) 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/<system>', and */ -+ /* contains system-specific files that are always included first when */ -+ /* building the library. */ -+ /* */ -+ /*************************************************************************/ -+ -+ -+#ifndef __FTCONFIG_H__ -+#define __FTCONFIG_H__ -+ -+#include <ft2build.h> -+#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/<system>' 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. */ - /* */ - /* <Input> */ ---- 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 @@ - /* */ - /* <Description> */ - /* 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. */ - /* */ - /* <Input> */ -@@ -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. */ - /* */ - /* <Input> */ -- /* 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 @@ - /* */ - /* <Description> */ - /* 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. */ - /* */ - /* <Fields> */ -@@ -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 @@ - /* */ - /* <Description> */ - /* 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 @@ - /* */ - /* <Description> */ - /* 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 <michael@poettgen.de>: -+ * From Michael Poettgen <michael@poettgen.de>: - * - * 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 <string.h> - #include <errno.h> - -+#ifdef VXWORKS -+#include <ioLib.h> -+#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 <qconfig.h> -+# 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 <strings.h> - #else - # include <string.h> 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 <qglobal.h> -+#if defined(Q_OS_WINCE) -+# include <qfunctions_wince.h> -+#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 <assert.h> header file. */ -+#define HAVE_ASSERT_H 1 -+ -+/* Define to 1 if you have the <dlfcn.h> header file. */ -+/* #undef HAVE_DLFCN_H */ -+ -+/* Define to 1 if you have the <fcntl.h> 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 <inttypes.h> 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 <limits.h> header file. */ -+/* #undef HAVE_LIMITS_H */ -+ -+/* Define to 1 if you have the <malloc.h> 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 <memory.h> 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 <search.h> 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 <stdint.h> header file. */ -+/* #undef HAVE_STDINT_H */ -+ -+/* Define to 1 if you have the <stdlib.h> 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 <strings.h> header file. */ -+/* #undef HAVE_STRINGS_H */ -+ -+/* Define to 1 if you have the <string.h> 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 <sys/stat.h> header file. */ -+/* #undef HAVE_SYS_STAT_H */ -+ -+/* Define to 1 if you have the <sys/time.h> header file. */ -+/* #undef HAVE_SYS_TIME_H */ -+ -+/* Define to 1 if you have the <sys/types.h> header file. */ -+#define HAVE_SYS_TYPES_H 1 -+ -+/* Define to 1 if you have the <unistd.h> header file. */ -+#define HAVE_UNISTD_H 1 -+ -+/* Define to 1 if you have the <windows.h> 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 <sys/time.h> and <time.h>. */ -+/* #undef TIME_WITH_SYS_TIME */ -+ -+/* Define to 1 if your <sys/time.h> 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 <sys/types.h> does not define. */ -+/* #undef off_t */ -+ -+/* Define to `unsigned' if <sys/types.h> 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 <qglobal.h> -+ - /* 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 <sys/types.h> -+#else -+# include <windows.h> -+# include <types.h> -+#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 <windows.h> - - 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 <search.h> 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 <qconfig.h> -+ - /* #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 <qconfig.h> -+ - #include <winbase.h> - - #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 <ioLib.h> -+#endif -+ - #include <stdarg.h> /* Needed for the definition of va_list */ - - /* -@@ -18792,7 +18799,11 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){ - #include <sys/stat.h> - #include <fcntl.h> - #include <unistd.h> --#include <sys/time.h> -+#ifdef VXWORKS -+# include <sys/times.h> -+#else -+# include <sys/time.h> -+#endif - #include <errno.h> - #ifdef SQLITE_ENABLE_LOCKING_STYLE - #include <sys/ioctl.h> -@@ -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. - */ 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 }; 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() */ 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/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 779b69b..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), @@ -352,6 +354,7 @@ public: QMetaType::SaveOperator saveOp; QMetaType::LoadOperator loadOp; #endif + int alias; }; Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE); @@ -436,8 +439,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 +481,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 +489,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<QCustomTypeInfo> *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 +559,7 @@ void QMetaType::unregisterType(const char *typeName) inf.typeName.clear(); inf.constr = 0; inf.destr = 0; + inf.alias = -1; } } } @@ -635,6 +688,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data) case QMetaType::QVariantList: stream << *static_cast<const NS(QVariantList)*>(data); break; + case QMetaType::QVariant: + stream << *static_cast<const NS(QVariant)*>(data); + break; #endif case QMetaType::QByteArray: stream << *static_cast<const NS(QByteArray)*>(data); @@ -837,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); @@ -1004,6 +1063,8 @@ void *QMetaType::construct(int type, const void *copy) return new NS(QVariantHash)(*static_cast<const NS(QVariantHash)*>(copy)); case QMetaType::QVariantList: return new NS(QVariantList)(*static_cast<const NS(QVariantList)*>(copy)); + case QMetaType::QVariant: + return new NS(QVariant)(*static_cast<const NS(QVariant)*>(copy)); #endif case QMetaType::QByteArray: return new NS(QByteArray)(*static_cast<const NS(QByteArray)*>(copy)); @@ -1099,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); @@ -1240,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); @@ -1349,6 +1415,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..2108b92 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) @@ -113,6 +114,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 +156,31 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t) } #endif // QT_NO_DATASTREAM +template <typename T> struct QMetaTypeId2; + +namespace QtPrivate { + template <typename T, bool Defined = QMetaTypeId2<T>::Defined> + struct QMetaTypeIdHelper { + static inline int qt_metatype_id() + { return QMetaTypeId2<T>::qt_metatype_id(); } + }; + template <typename T> struct QMetaTypeIdHelper<T, false> { + static inline int qt_metatype_id() + { return -1; } + }; +} + template <typename T> int qRegisterMetaType(const char *typeName #ifndef qdoc - , T * /* dummy */ = 0 + , T * dummy = 0 #endif ) { + const int typedefOf = dummy ? -1 : QtPrivate::QMetaTypeIdHelper<T>::qt_metatype_id(); + if (typedefOf != -1) + return QMetaType::registerTypedef(typeName, typedefOf); + typedef void*(*ConstructPtr)(const T*); ConstructPtr cptr = qMetaTypeConstructHelper<T>; typedef void(*DeletePtr)(T*); @@ -254,7 +274,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; \ } \ }; \ @@ -320,6 +341,7 @@ class QVector2D; class QVector3D; class QVector4D; class QQuaternion; +class QVariant; QT_END_NAMESPACE @@ -388,6 +410,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/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; 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<const void *>(&aData)) {} }; +template <class T> +class QArgument<T &>: public QGenericArgument +{ +public: + inline QArgument(const char *aName, T &aData) + : QGenericArgument(aName, static_cast<const void *>(&aData)) + {} +}; template <typename T> 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<typename T> inline T qvariant_cast(const QVariant &v) template<> inline QVariant qvariant_cast<QVariant>(const QVariant &v) { - static const int vid = qRegisterMetaType<QVariant>("QVariant"); - if (vid == v.userType()) + if (v.userType() == QMetaType::QVariant) return *reinterpret_cast<const QVariant *>(v.constData()); return v; } 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() */ diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 724f3e0..c69dd09 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 <mm3dnow.h> #endif +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + enum CPUFeatures { None = 0, MMX = 0x1, @@ -118,6 +119,8 @@ enum CPUFeatures { Q_CORE_EXPORT uint qDetectCPUFeatures(); +Q_CORE_EXPORT uint qDetectCPUFeatures(); + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index 7c40e35..9205297 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -100,7 +100,8 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int HB_GetSentenceBoundaries(string, length, scriptItems.data(), scriptItems.count(), attributes); } -/*! \class QTextBoundaryFinder +/*! + \class QTextBoundaryFinder \brief The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string. @@ -331,7 +332,7 @@ QString QTextBoundaryFinder::string() const /*! Moves the QTextBoundaryFinder to the next boundary position and returns that position. - Returns -1 is there is no next boundary. + Returns -1 if there is no next boundary. */ int QTextBoundaryFinder::toNextBoundary() { @@ -373,7 +374,7 @@ int QTextBoundaryFinder::toNextBoundary() /*! Moves the QTextBoundaryFinder to the previous boundary position and returns that position. - Returns -1 is there is no previous boundary. + Returns -1 if there is no previous boundary. */ int QTextBoundaryFinder::toPreviousBoundary() { diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 34e4834..6e77abf 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -6,12 +6,14 @@ Flickable: renamed viewportHeight -> contentHeight Flickable: renamed viewportX -> contentX Flickable: renamed viewportY -> contentY Removed Flickable.reportedVelocitySmoothing +Removed Qt.playSound (replaced by SoundEffect element) Renamed MouseRegion -> MouseArea Connection: syntax and rename: Connection { sender: a; signal: foo(); script: xxx } Connection { sender: a; signal: bar(); script: yyy } becomes: Connections { target: a; onFoo: xxx; onBar: yyy } +Using WebView now requires "import org.webkit 1.0" QmlView ------- @@ -52,6 +54,16 @@ matchProperties and matchTargets have been renamed back to properties and target The semantics are explained in the PropertyAnimation::properties documentation and the animation overview documentation. +Behavior and Animation syntax +----------------------------- + +Previously animations and behaviors could be "assigned" to properties like this: + Item { x: Behavior {}; y: NumberAnimation {} } +To make it more obvious that these are not regular value assignments a new "on" +syntax has been introduced: + Item { Behavior on x {}; NumberAnimation on y {} } +Only the syntax has changed, the behavior is identical. + ============================================================================= The changes below are pre-4.6.0 release. diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri index 7a85f00..3ff92b1 100644 --- a/src/declarative/graphicsitems/graphicsitems.pri +++ b/src/declarative/graphicsitems/graphicsitems.pri @@ -84,10 +84,3 @@ SOURCES += \ $$PWD/qdeclarativegraphicsobjectcontainer.cpp \ $$PWD/qdeclarativeparticles.cpp \ $$PWD/qdeclarativelayoutitem.cpp \ - -contains(QT_CONFIG, webkit) { - QT+=webkit - SOURCES += $$PWD/qdeclarativewebview.cpp - HEADERS += $$PWD/qdeclarativewebview_p.h - HEADERS += $$PWD/qdeclarativewebview_p_p.h -} diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index c54ddd0..63c97e0 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; @@ -682,7 +681,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent else rejectY = true; } - if (!rejectY) { + if (!rejectY && stealMouse) { _moveY.setValue(newY); moved = true; } @@ -709,7 +708,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent else rejectX = true; } - if (!rejectX) { + if (!rejectX && stealMouse) { _moveX.setValue(newX); moved = true; } @@ -752,6 +751,8 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_Q(QDeclarativeFlickable); + stealMouse = false; + q->setKeepMouseGrab(false); pressed = false; if (lastPosTime.isNull()) return; @@ -781,7 +782,6 @@ void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEv fixupX(); } - stealMouse = false; lastPosTime = QTime(); if (!timeline.isActive()) @@ -804,6 +804,8 @@ void QDeclarativeFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeFlickable); if (d->interactive) { d->handleMouseMoveEvent(event); + if (d->stealMouse) + setKeepMouseGrab(true); event->accept(); } else { QDeclarativeItem::mouseMoveEvent(event); @@ -1141,7 +1143,8 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event) QGraphicsScene *s = scene(); QDeclarativeItem *grabber = s ? qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()) : 0; - if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { + bool stealThisEvent = d->stealMouse; + if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { mouseEvent.setAccepted(false); for (int i = 0x1; i <= 0x10; i <<= 1) { if (event->buttons() & i) { @@ -1176,17 +1179,19 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event) break; } grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()); - if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) { + if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) { d->clearDelayedPress(); grabMouse(); } - return d->stealMouse || d->delayedPressEvent; + return stealThisEvent || d->delayedPressEvent; } else if (!d->lastPosTime.isNull()) { d->lastPosTime = QTime(); } - if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) + if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) { d->clearDelayedPress(); + d->stealMouse = false; + } return false; } diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index b43b30b..463b238 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -45,14 +45,13 @@ #include "qdeclarativeflickable_p_p.h" #include <qdeclarativeeasefollow_p.h> +#include <qdeclarativeguard_p.h> #include <qlistmodelinterface_p.h> #include <QKeyEvent> QT_BEGIN_NAMESPACE -QHash<QObject*, QDeclarativeGridViewAttached*> QDeclarativeGridViewAttached::attachedProperties; - //---------------------------------------------------------------------------- @@ -60,8 +59,9 @@ class FxGridItem { public: FxGridItem(QDeclarativeItem *i, QDeclarativeGridView *v) : item(i), view(v) { - attached = QDeclarativeGridViewAttached::properties(item); - attached->m_view = view; + attached = static_cast<QDeclarativeGridViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeGridView>(item)); + if (attached) + attached->m_view = view; } ~FxGridItem() {} @@ -251,7 +251,7 @@ public: } } - QGuard<QDeclarativeVisualModel> model; + QDeclarativeGuard<QDeclarativeVisualModel> model; QVariant modelVariant; QList<FxGridItem*> visibleItems; QHash<QDeclarativeItem*,int> unrequestedItems; @@ -618,7 +618,7 @@ void QDeclarativeGridViewPrivate::createHighlight() } } if (changed) - emit q->highlightChanged(); + emit q->highlightItemChanged(); } void QDeclarativeGridViewPrivate::updateHighlight() @@ -696,6 +696,11 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex) In this case ListModel is a handy way for us to test our UI. In practice the model would be implemented in C++, or perhaps via a SQL data source. + + Note that views do not enable \e clip automatically. If the view + is not clipped by another item or the screen, it will be necessary + to set \e {clip: true} in order to have the out of view items clipped + nicely. */ QDeclarativeGridView::QDeclarativeGridView(QDeclarativeItem *parent) : QDeclarativeFlickable(*(new QDeclarativeGridViewPrivate), parent) @@ -743,7 +748,7 @@ QDeclarativeGridView::~QDeclarativeGridView() id: myDelegate Item { id: wrapper - GridView.onRemove: SequentialAnimation { + SequentialAnimation on GridView.onRemove { PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: true } NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing: "easeInOutQuad" } PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: false } @@ -784,6 +789,8 @@ QVariant QDeclarativeGridView::model() const void QDeclarativeGridView::setModel(const QVariant &model) { Q_D(QDeclarativeGridView); + if (d->modelVariant == model) + return; if (d->model) { disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); @@ -828,6 +835,7 @@ void QDeclarativeGridView::setModel(const QVariant &model) connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*))); emit countChanged(); } + emit modelChanged(); } /*! @@ -871,6 +879,7 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate) d->moveReason = QDeclarativeGridViewPrivate::SetIndex; d->updateCurrent(d->currentIndex); } + emit delegateChanged(); } } @@ -966,6 +975,7 @@ void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight) if (highlight != d->highlightComponent) { d->highlightComponent = highlight; d->updateCurrent(d->currentIndex); + emit highlightChanged(); } } @@ -983,8 +993,8 @@ void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight) id: myHighlight Rectangle { id: wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60 - y: SpringFollow { source: Wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 } - x: SpringFollow { source: Wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 } + SpringFollow on y { source: Wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 } + SpringFollow on x { source: Wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 } } } \endcode @@ -1039,6 +1049,7 @@ void QDeclarativeGridView::setFlow(Flow flow) d->updateGrid(); refill(); d->updateCurrent(d->currentIndex); + emit flowChanged(); } } @@ -1058,7 +1069,10 @@ bool QDeclarativeGridView::isWrapEnabled() const void QDeclarativeGridView::setWrapEnabled(bool wrap) { Q_D(QDeclarativeGridView); + if (d->wrap == wrap) + return; d->wrap = wrap; + emit keyNavigationWrapsChanged(); } /*! @@ -1082,6 +1096,7 @@ void QDeclarativeGridView::setCacheBuffer(int buffer) d->buffer = buffer; if (isComponentComplete()) refill(); + emit cacheBufferChanged(); } } @@ -1325,6 +1340,18 @@ void QDeclarativeGridView::moveCurrentIndexRight() } } +/*! + \qmlmethod GridView::positionViewAtIndex(int index) + + Positions the view such that the \a index is at the top (or left for horizontal orientation) of the view. + If positioning the view at the index would cause empty space to be displayed at + the end of the view, the view will be positioned at the end. + + It is not recommended to use contentX or contentY to position the view + at a particular index. This is unreliable since removing items from the start + of the list does not cause all other items to be repositioned. + The correct way to bring an item into view is with positionViewAtIndex. +*/ void QDeclarativeGridView::positionViewAtIndex(int index) { Q_D(QDeclarativeGridView); @@ -1732,7 +1759,7 @@ void QDeclarativeGridView::refill() QDeclarativeGridViewAttached *QDeclarativeGridView::qmlAttachedProperties(QObject *obj) { - return QDeclarativeGridViewAttached::properties(obj); + return new QDeclarativeGridViewAttached(obj); } QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h index b488475..22fcef6 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview_p.h +++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h @@ -57,19 +57,19 @@ class Q_DECLARATIVE_EXPORT QDeclarativeGridView : public QDeclarativeFlickable Q_OBJECT Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeGridView) - Q_PROPERTY(QVariant model READ model WRITE setModel) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate) + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(QDeclarativeItem *currentItem READ currentItem NOTIFY currentIndexChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight) - Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightChanged) + Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem) - Q_PROPERTY(Flow flow READ flow WRITE setFlow) - Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled) - Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer) + Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled NOTIFY keyNavigationWrapsChanged) + Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged) Q_PROPERTY(int cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellWidthChanged) Q_PROPERTY(int cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellHeightChanged) Q_CLASSINFO("DefaultProperty", "data") @@ -129,6 +129,12 @@ Q_SIGNALS: void cellWidthChanged(); void cellHeightChanged(); void highlightChanged(); + void highlightItemChanged(); + void modelChanged(); + void delegateChanged(); + void flowChanged(); + void keyNavigationWrapsChanged(); + void cacheBufferChanged(); protected: virtual void viewportMoved(); @@ -161,9 +167,7 @@ class QDeclarativeGridViewAttached : public QObject public: QDeclarativeGridViewAttached(QObject *parent) : QObject(parent), m_isCurrent(false), m_delayRemove(false) {} - ~QDeclarativeGridViewAttached() { - attachedProperties.remove(parent()); - } + ~QDeclarativeGridViewAttached() {} Q_PROPERTY(QDeclarativeGridView *view READ view CONSTANT) QDeclarativeGridView *view() { return m_view; } @@ -186,15 +190,6 @@ public: } } - static QDeclarativeGridViewAttached *properties(QObject *obj) { - QDeclarativeGridViewAttached *rv = attachedProperties.value(obj); - if (!rv) { - rv = new QDeclarativeGridViewAttached(obj); - attachedProperties.insert(obj, rv); - } - return rv; - } - void emitAdd() { emit add(); } void emitRemove() { emit remove(); } @@ -206,10 +201,8 @@ Q_SIGNALS: public: QDeclarativeGridView *m_view; - bool m_isCurrent; - bool m_delayRemove; - - static QHash<QObject*, QDeclarativeGridViewAttached*> attachedProperties; + bool m_isCurrent : 1; + bool m_delayRemove : 1; }; diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 99ab053..2739ab8 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -232,6 +232,16 @@ qreal QDeclarativeImage::paintedHeight() const \o Error - an error occurred while loading the image \endlist + Note that a change in the status property does not cause anything to happen + (although it reflects what has happened with the image internally). If you wish + to react to the change in status you need to do it yourself, for example in one + of the following ways: + \list + \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: image.status = Image.Ready;} + \o Do something inside the onStatusChanged signal handler, e.g. Image{id: image; onStatusChanged: if(image.status == Image.Ready) console.log('Loaded');} + \o Bind to the status variable somewhere, e.g. Text{text: if(image.status!=Image.Ready){'Not Loaded';}else{'Loaded';}} + \endlist + \sa progress */ diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index f48c761..3bee5b8 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -498,6 +498,32 @@ void QDeclarativeKeyNavigationAttached::setDown(QDeclarativeItem *i) emit changed(); } +QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const +{ + Q_D(const QDeclarativeKeyNavigationAttached); + return d->tab; +} + +void QDeclarativeKeyNavigationAttached::setTab(QDeclarativeItem *i) +{ + Q_D(QDeclarativeKeyNavigationAttached); + d->tab = i; + emit changed(); +} + +QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const +{ + Q_D(const QDeclarativeKeyNavigationAttached); + return d->backtab; +} + +void QDeclarativeKeyNavigationAttached::setBacktab(QDeclarativeItem *i) +{ + Q_D(QDeclarativeKeyNavigationAttached); + d->backtab = i; + emit changed(); +} + void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event) { Q_D(QDeclarativeKeyNavigationAttached); @@ -529,6 +555,18 @@ void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event) event->accept(); } break; + case Qt::Key_Tab: + if (d->tab) { + d->tab->setFocus(true); + event->accept(); + } + break; + case Qt::Key_Backtab: + if (d->backtab) { + d->backtab->setFocus(true); + event->accept(); + } + break; default: break; } @@ -563,6 +601,16 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event) event->accept(); } break; + case Qt::Key_Tab: + if (d->tab) { + event->accept(); + } + break; + case Qt::Key_Backtab: + if (d->backtab) { + event->accept(); + } + break; default: break; } @@ -902,6 +950,8 @@ const QDeclarativeKeysAttached::SigMap QDeclarativeKeysAttached::sigMap[] = { { Qt::Key_Right, "rightPressed" }, { Qt::Key_Up, "upPressed" }, { Qt::Key_Down, "downPressed" }, + { Qt::Key_Tab, "tabPressed" }, + { Qt::Key_Backtab, "backtabPressed" }, { Qt::Key_Asterisk, "asteriskPressed" }, { Qt::Key_NumberSign, "numberSignPressed" }, { Qt::Key_Escape, "escapePressed" }, @@ -1172,7 +1222,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 @@ -1440,7 +1490,7 @@ QDeclarativeAnchors *QDeclarativeItem::anchors() void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty<QObject> *prop, QObject *o) { QDeclarativeItem *i = qobject_cast<QDeclarativeItem *>(o); - if (i) + if (i) i->setParentItem(static_cast<QDeclarativeItem *>(prop->object)); else o->setParent(static_cast<QDeclarativeItem *>(prop->object)); @@ -1568,7 +1618,7 @@ void QDeclarativeItemPrivate::transform_clear(QDeclarativeListProperty<QGraphics */ /*! \internal */ -QDeclarativeListProperty<QObject> QDeclarativeItem::data() +QDeclarativeListProperty<QObject> QDeclarativeItem::data() { return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::data_append); } @@ -2179,16 +2229,16 @@ void QDeclarativeItem::focusChanged(bool flag) QDeclarativeListProperty<QDeclarativeItem> QDeclarativeItem::fxChildren() { return QDeclarativeListProperty<QDeclarativeItem>(this, 0, QDeclarativeItemPrivate::children_append, - QDeclarativeItemPrivate::children_count, - QDeclarativeItemPrivate::children_at); + QDeclarativeItemPrivate::children_count, + QDeclarativeItemPrivate::children_at); } /*! \internal */ QDeclarativeListProperty<QObject> QDeclarativeItem::resources() { - return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::resources_append, - QDeclarativeItemPrivate::resources_count, - QDeclarativeItemPrivate::resources_at); + return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::resources_append, + QDeclarativeItemPrivate::resources_count, + QDeclarativeItemPrivate::resources_at); } /*! @@ -2465,14 +2515,26 @@ QPointF QDeclarativeItemPrivate::computeTransformOrigin() const /*! \internal */ bool QDeclarativeItem::sceneEvent(QEvent *event) { - bool rv = QGraphicsItem::sceneEvent(event); + if (event->type() == QEvent::KeyPress) { + QKeyEvent *k = static_cast<QKeyEvent *>(event); - if (event->type() == QEvent::FocusIn || - event->type() == QEvent::FocusOut) { - focusChanged(hasFocus()); - } + if ((k->key() == Qt::Key_Tab || k->key() == Qt::Key_Backtab) && + !(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) { + keyPressEvent(static_cast<QKeyEvent *>(event)); + if (!event->isAccepted()) + QGraphicsItem::sceneEvent(event); + } else { + QGraphicsItem::sceneEvent(event); + } + } else { + bool rv = QGraphicsItem::sceneEvent(event); - return rv; + if (event->type() == QEvent::FocusIn || + event->type() == QEvent::FocusOut) { + focusChanged(hasFocus()); + } + return rv; + } } /*! \internal */ diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index 4b4917e..e424970 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -289,12 +289,14 @@ class QDeclarativeKeyNavigationAttachedPrivate : public QObjectPrivate { public: QDeclarativeKeyNavigationAttachedPrivate() - : QObjectPrivate(), left(0), right(0), up(0), down(0) {} + : QObjectPrivate(), left(0), right(0), up(0), down(0), tab(0), backtab(0) {} QDeclarativeItem *left; QDeclarativeItem *right; QDeclarativeItem *up; QDeclarativeItem *down; + QDeclarativeItem *tab; + QDeclarativeItem *backtab; }; class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeItemKeyFilter @@ -306,6 +308,9 @@ class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeIte Q_PROPERTY(QDeclarativeItem *right READ right WRITE setRight NOTIFY changed) Q_PROPERTY(QDeclarativeItem *up READ up WRITE setUp NOTIFY changed) Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY changed) + Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY changed) + Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY changed) + public: QDeclarativeKeyNavigationAttached(QObject * = 0); @@ -317,6 +322,10 @@ public: void setUp(QDeclarativeItem *); QDeclarativeItem *down() const; void setDown(QDeclarativeItem *); + QDeclarativeItem *tab() const; + void setTab(QDeclarativeItem *); + QDeclarativeItem *backtab() const; + void setBacktab(QDeclarativeItem *); static QDeclarativeKeyNavigationAttached *qmlAttachedProperties(QObject *); @@ -407,6 +416,8 @@ Q_SIGNALS: void rightPressed(QDeclarativeKeyEvent *event); void upPressed(QDeclarativeKeyEvent *event); void downPressed(QDeclarativeKeyEvent *event); + void tabPressed(QDeclarativeKeyEvent *event); + void backtabPressed(QDeclarativeKeyEvent *event); void asteriskPressed(QDeclarativeKeyEvent *event); void numberSignPressed(QDeclarativeKeyEvent *event); diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index f3b9385..25660f8 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -106,7 +106,6 @@ void QDeclarativeItemModule::defineModule() QML_REGISTER_TYPE(Qt,4,6,LayoutItem,QDeclarativeLayoutItem); QML_REGISTER_TYPE(Qt,4,6,ListView,QDeclarativeListView); QML_REGISTER_TYPE(Qt,4,6,Loader,QDeclarativeLoader); - QML_REGISTER_TYPE(Qt,4,6,MouseRegion,QDeclarativeMouseArea); QML_REGISTER_TYPE(Qt,4,6,MouseArea,QDeclarativeMouseArea); QML_REGISTER_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect); QML_REGISTER_TYPE(Qt,4,6,ParticleMotion,QDeclarativeParticleMotion); @@ -139,9 +138,6 @@ void QDeclarativeItemModule::defineModule() QML_REGISTER_TYPE(Qt,4,6,VisibleArea,QDeclarativeFlickableVisibleArea); QML_REGISTER_TYPE(Qt,4,6,VisualDataModel,QDeclarativeVisualDataModel); QML_REGISTER_TYPE(Qt,4,6,VisualItemModel,QDeclarativeVisualItemModel); -#ifdef QT_WEBKIT_LIB - QML_REGISTER_TYPE(Qt,4,6,WebView,QDeclarativeWebView); -#endif QML_REGISTER_NOCREATE_TYPE(QDeclarativeAnchors); QML_REGISTER_NOCREATE_TYPE(QGraphicsEffect); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 03303a0..cd8d143 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -47,6 +47,7 @@ #include <qdeclarativeeasefollow_p.h> #include <qdeclarativeexpression.h> #include <qdeclarativeengine.h> +#include <qdeclarativeguard_p.h> #include <qlistmodelinterface_p.h> #include <QKeyEvent> @@ -222,7 +223,7 @@ public: if (!visibleItems.isEmpty()) { pos = (*visibleItems.constBegin())->position(); if (visibleIndex > 0) - pos -= visibleIndex * (averageSize + spacing) - spacing; + pos -= visibleIndex * (averageSize + spacing); } return pos; } @@ -429,7 +430,7 @@ public: virtual void flickX(qreal velocity); virtual void flickY(qreal velocity); - QGuard<QDeclarativeVisualModel> model; + QDeclarativeGuard<QDeclarativeVisualModel> model; QVariant modelVariant; QList<FxListItem*> visibleItems; QHash<QDeclarativeItem*,int> unrequestedItems; @@ -798,10 +799,13 @@ void QDeclarativeListViewPrivate::createHighlight() if (item) { item->setParent(q->viewport()); highlight = new FxListItem(item, q); - if (orient == QDeclarativeListView::Vertical) - highlight->item->setHeight(currentItem->item->height()); - else - highlight->item->setWidth(currentItem->item->width()); + if (currentItem && autoHighlight) { + if (orient == QDeclarativeListView::Vertical) { + highlight->item->setHeight(currentItem->item->height()); + } else { + highlight->item->setWidth(currentItem->item->width()); + } + } const QLatin1String posProp(orient == QDeclarativeListView::Vertical ? "y" : "x"); highlightPosAnimator = new QDeclarativeEaseFollow(q); highlightPosAnimator->setTarget(QDeclarativeProperty(highlight->item, posProp)); @@ -816,7 +820,7 @@ void QDeclarativeListViewPrivate::createHighlight() } } if (changed) - emit q->highlightChanged(); + emit q->highlightItemChanged(); } void QDeclarativeListViewPrivate::updateHighlight() @@ -1358,6 +1362,11 @@ void QDeclarativeListViewPrivate::flickY(qreal velocity) In this case ListModel is a handy way for us to test our UI. In practice the model would be implemented in C++, or perhaps via a SQL data source. + + Note that views do not enable \e clip automatically. If the view + is not clipped by another item or the screen, it will be necessary + to set \e {clip: true} in order to have the out of view items clipped + nicely. */ QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent) @@ -1430,7 +1439,7 @@ QDeclarativeListView::~QDeclarativeListView() id: myDelegate Item { id: wrapper - ListView.onRemove: SequentialAnimation { + SequentialAnimation on ListView.onRemove { PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: true } NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing: "easeInOutQuad" } PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: false } @@ -1473,6 +1482,8 @@ QVariant QDeclarativeListView::model() const void QDeclarativeListView::setModel(const QVariant &model) { Q_D(QDeclarativeListView); + if (d->modelVariant == model) + return; if (d->model) { disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); @@ -1517,6 +1528,7 @@ void QDeclarativeListView::setModel(const QVariant &model) connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*))); emit countChanged(); } + emit modelChanged(); } /*! @@ -1563,6 +1575,7 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate) d->updateCurrent(d->currentIndex); } } + emit delegateChanged(); } /*! @@ -1663,6 +1676,7 @@ void QDeclarativeListView::setHighlight(QDeclarativeComponent *highlight) d->createHighlight(); if (d->currentItem) d->updateHighlight(); + emit highlightChanged(); } } @@ -1700,6 +1714,7 @@ void QDeclarativeListView::setHighlightFollowsCurrentItem(bool autoHighlight) d->highlightSizeAnimator->setEnabled(d->autoHighlight); } d->updateHighlight(); + emit highlightFollowsCurrentItemChanged(); } } @@ -1745,8 +1760,11 @@ qreal QDeclarativeListView::preferredHighlightBegin() const void QDeclarativeListView::setPreferredHighlightBegin(qreal start) { Q_D(QDeclarativeListView); + if (d->highlightRangeStart == start) + return; d->highlightRangeStart = start; d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd; + emit preferredHighlightBeginChanged(); } qreal QDeclarativeListView::preferredHighlightEnd() const @@ -1758,8 +1776,11 @@ qreal QDeclarativeListView::preferredHighlightEnd() const void QDeclarativeListView::setPreferredHighlightEnd(qreal end) { Q_D(QDeclarativeListView); + if (d->highlightRangeEnd == end) + return; d->highlightRangeEnd = end; d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd; + emit preferredHighlightEndChanged(); } QDeclarativeListView::HighlightRangeMode QDeclarativeListView::highlightRangeMode() const @@ -1771,8 +1792,11 @@ QDeclarativeListView::HighlightRangeMode QDeclarativeListView::highlightRangeMod void QDeclarativeListView::setHighlightRangeMode(HighlightRangeMode mode) { Q_D(QDeclarativeListView); + if (d->highlightRange == mode) + return; d->highlightRange = mode; d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd; + emit highlightRangeModeChanged(); } /*! @@ -1848,7 +1872,10 @@ bool QDeclarativeListView::isWrapEnabled() const void QDeclarativeListView::setWrapEnabled(bool wrap) { Q_D(QDeclarativeListView); + if (d->wrap == wrap) + return; d->wrap = wrap; + emit keyNavigationWrapsChanged(); } /*! @@ -1874,6 +1901,7 @@ void QDeclarativeListView::setCacheBuffer(int b) d->bufferMode = QDeclarativeListViewPrivate::BufferBefore | QDeclarativeListViewPrivate::BufferAfter; refill(); } + emit cacheBufferChanged(); } } @@ -1998,6 +2026,7 @@ void QDeclarativeListView::setSnapMode(SnapMode mode) Q_D(QDeclarativeListView); if (d->snapMode != mode) { d->snapMode = mode; + emit snapModeChanged(); } } @@ -2020,6 +2049,7 @@ void QDeclarativeListView::setFooter(QDeclarativeComponent *footer) d->maxExtentDirty = true; d->updateFooter(); d->updateViewport(); + emit footerChanged(); } } @@ -2043,6 +2073,7 @@ void QDeclarativeListView::setHeader(QDeclarativeComponent *header) d->updateHeader(); d->updateFooter(); d->updateViewport(); + emit headerChanged(); } } @@ -2258,6 +2289,12 @@ void QDeclarativeListView::decrementCurrentIndex() Positions the view such that the \a index is at the top (or left for horizontal orientation) of the view. If positioning the view at the index would cause empty space to be displayed at the end of the view, the view will be positioned at the end. + + It is not recommended to use contentX or contentY to position the view + at a particular index. This is unreliable since removing items from the start + of the list does not cause all other items to be repositioned, and because + the actual start of the view can vary based on the size of the delegates. + The correct way to bring an item into view is with positionViewAtIndex. */ void QDeclarativeListView::positionViewAtIndex(int index) { @@ -2380,7 +2417,8 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) int i = d->visibleItems.count() - 1; while (i > 0 && d->visibleItems.at(i)->index == -1) --i; - if (d->visibleItems.at(i)->index + 1 == modelIndex) { + if (d->visibleItems.at(i)->index + 1 == modelIndex + && d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) { // Special case of appending an item to the model. modelIndex = d->visibleIndex + d->visibleItems.count(); } else { diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h index 5e3edb0..f9b7b50 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview_p.h +++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h @@ -91,33 +91,33 @@ class Q_DECLARATIVE_EXPORT QDeclarativeListView : public QDeclarativeFlickable Q_OBJECT Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeListView) - Q_PROPERTY(QVariant model READ model WRITE setModel) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate) + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(QDeclarativeItem *currentItem READ currentItem NOTIFY currentIndexChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight) - Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightChanged) - Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem) + Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) + Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem NOTIFY highlightFollowsCurrentItemChanged) Q_PROPERTY(qreal highlightMoveSpeed READ highlightMoveSpeed WRITE setHighlightMoveSpeed NOTIFY highlightMoveSpeedChanged) Q_PROPERTY(qreal highlightResizeSpeed READ highlightResizeSpeed WRITE setHighlightResizeSpeed NOTIFY highlightResizeSpeedChanged) - Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin) - Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd) - Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode) + Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged) + Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged) + Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged) Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) - Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled) - Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer) + Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled NOTIFY keyNavigationWrapsChanged) + Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged) Q_PROPERTY(QDeclarativeViewSection *section READ sectionCriteria CONSTANT) Q_PROPERTY(QString currentSection READ currentSection NOTIFY currentSectionChanged) - Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) - Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader) - Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter) + Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader NOTIFY headerChanged) + Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter NOTIFY footerChanged) Q_ENUMS(HighlightRangeMode) Q_ENUMS(Orientation) @@ -205,6 +205,18 @@ Q_SIGNALS: void highlightMoveSpeedChanged(); void highlightResizeSpeedChanged(); void highlightChanged(); + void highlightItemChanged(); + void modelChanged(); + void delegateChanged(); + void highlightFollowsCurrentItemChanged(); + void preferredHighlightBeginChanged(); + void preferredHighlightEndChanged(); + void highlightRangeModeChanged(); + void keyNavigationWrapsChanged(); + void cacheBufferChanged(); + void snapModeChanged(); + void headerChanged(); + void footerChanged(); protected: virtual void viewportMoved(); diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index bd89321..b0499d7 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -320,6 +320,15 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded() \o Error - an error occurred while loading the QML source \endlist + Note that a change in the status property does not cause anything to happen + (although it reflects what has happened to the loader internally). If you wish + to react to the change in status you need to do it yourself, for example in one + of the following ways: + \list + \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: loader.status = Loader.Ready;} + \o Do something inside the onStatusChanged signal handler, e.g. Loader{id: loader; onStatusChanged: if(loader.status == Loader.Ready) console.log('Loaded');} + \o Bind to the status variable somewhere, e.g. Text{text: if(loader.status!=Loader.Ready){'Not Loaded';}else{'Loaded';}} + \endlist \sa progress */ diff --git a/src/declarative/graphicsitems/qdeclarativeparticles.cpp b/src/declarative/graphicsitems/qdeclarativeparticles.cpp index 1a58d3f..deabdd6 100644 --- a/src/declarative/graphicsitems/qdeclarativeparticles.cpp +++ b/src/declarative/graphicsitems/qdeclarativeparticles.cpp @@ -1260,7 +1260,11 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics const int myX = x() + parentItem()->x(); const int myY = y() + parentItem()->y(); +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) QVarLengthArray<QPainter::Fragment, 256> pixmapData; +#else + QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData; +#endif pixmapData.resize(d->particles.count()); const QRectF sourceRect = d->image.rect(); @@ -1268,20 +1272,32 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics qreal halfPHeight = sourceRect.height()/2.; for (int i = 0; i < d->particles.count(); ++i) { const QDeclarativeParticle &particle = d->particles.at(i); +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].x = particle.x - myX + halfPWidth; pixmapData[i].y = particle.y - myY + halfPHeight; +#else + pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight); +#endif pixmapData[i].opacity = particle.opacity; //these never change pixmapData[i].rotation = 0; pixmapData[i].scaleX = 1; pixmapData[i].scaleY = 1; +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].sourceLeft = sourceRect.left(); pixmapData[i].sourceTop = sourceRect.top(); pixmapData[i].width = sourceRect.width(); pixmapData[i].height = sourceRect.height(); +#else + pixmapData[i].source = sourceRect; +#endif } +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image); +#else + qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image); +#endif } void QDeclarativeParticles::componentComplete() diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index 48f112a..80586b8 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -114,7 +114,10 @@ qreal QDeclarativePath::startX() const void QDeclarativePath::setStartX(qreal x) { Q_D(QDeclarativePath); + if (qFuzzyCompare(x, d->startX)) + return; d->startX = x; + emit startXChanged(); } qreal QDeclarativePath::startY() const @@ -126,7 +129,10 @@ qreal QDeclarativePath::startY() const void QDeclarativePath::setStartY(qreal y) { Q_D(QDeclarativePath); + if (qFuzzyCompare(y, d->startY)) + return; d->startY = y; + emit startYChanged(); } /*! @@ -522,7 +528,10 @@ QString QDeclarativePathAttribute::name() const void QDeclarativePathAttribute::setName(const QString &name) { - _name = name; + if (_name == name) + return; + _name = name; + emit nameChanged(); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h index b3139f8..d7cfca1 100644 --- a/src/declarative/graphicsitems/qdeclarativepath_p.h +++ b/src/declarative/graphicsitems/qdeclarativepath_p.h @@ -67,7 +67,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativePathAttribute : public QDeclarativePathEl { Q_OBJECT - Q_PROPERTY(QString name READ name WRITE setName) + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed) public: QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {} @@ -79,6 +79,9 @@ public: qreal value() const; void setValue(qreal value); +Q_SIGNALS: + void nameChanged(); + private: QString _name; qreal _value; @@ -190,8 +193,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativePath : public QObject, public QDeclarativ Q_INTERFACES(QDeclarativeParserStatus) Q_PROPERTY(QDeclarativeListProperty<QDeclarativePathElement> pathElements READ pathElements) - Q_PROPERTY(qreal startX READ startX WRITE setStartX) - Q_PROPERTY(qreal startY READ startY WRITE setStartY) + Q_PROPERTY(qreal startX READ startX WRITE setStartX NOTIFY startXChanged) + Q_PROPERTY(qreal startY READ startY WRITE setStartY NOTIFY startYChanged) Q_PROPERTY(bool closed READ isClosed NOTIFY changed) Q_CLASSINFO("DefaultProperty", "pathElements") Q_INTERFACES(QDeclarativeParserStatus) @@ -216,6 +219,8 @@ public: Q_SIGNALS: void changed(); + void startXChanged(); + void startYChanged(); protected: virtual void componentComplete(); diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index f1b0213..50aa9ef 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -203,6 +203,9 @@ QVariant QDeclarativePathView::model() const void QDeclarativePathView::setModel(const QVariant &model) { Q_D(QDeclarativePathView); + if (d->modelVariant == model) + return; + if (d->model) { disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); @@ -242,6 +245,7 @@ void QDeclarativePathView::setModel(const QVariant &model) d->pathOffset = 0; d->regenerate(); d->fixOffset(); + emit modelChanged(); } /*! @@ -269,9 +273,12 @@ QDeclarativePath *QDeclarativePathView::path() const void QDeclarativePathView::setPath(QDeclarativePath *path) { Q_D(QDeclarativePathView); + if (d->path == path) + return; d->path = path; connect(d->path, SIGNAL(changed()), this, SLOT(refill())); d->regenerate(); + emit pathChanged(); } /*! @@ -333,7 +340,7 @@ void QDeclarativePathViewPrivate::setOffset(qreal o) /*! \qmlproperty real PathView::snapPosition - This property determines the position (0-100) the nearest item will snap to. + This property determines the position (0.0-1.0) the nearest item will snap to. */ qreal QDeclarativePathView::snapPosition() const { @@ -344,8 +351,12 @@ qreal QDeclarativePathView::snapPosition() const void QDeclarativePathView::setSnapPosition(qreal pos) { Q_D(QDeclarativePathView); - d->snapPos = pos/100; + qreal normalizedPos = pos - int(pos); + if (qFuzzyCompare(normalizedPos, d->snapPos)) + return; + d->snapPos = normalizedPos; d->fixOffset(); + emit snapPositionChanged(); } /*! @@ -365,7 +376,10 @@ qreal QDeclarativePathView::dragMargin() const void QDeclarativePathView::setDragMargin(qreal dragMargin) { Q_D(QDeclarativePathView); + if (d->dragMargin == dragMargin) + return; d->dragMargin = dragMargin; + emit dragMarginChanged(); } /*! @@ -392,16 +406,19 @@ QDeclarativeComponent *QDeclarativePathView::delegate() const return 0; } -void QDeclarativePathView::setDelegate(QDeclarativeComponent *c) +void QDeclarativePathView::setDelegate(QDeclarativeComponent *delegate) { Q_D(QDeclarativePathView); + if (delegate == this->delegate()) + return; if (!d->ownModel) { d->model = new QDeclarativeVisualDataModel(qmlContext(this)); d->ownModel = true; } if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) { - dataModel->setDelegate(c); + dataModel->setDelegate(delegate); d->regenerate(); + emit delegateChanged(); } } @@ -422,6 +439,7 @@ void QDeclarativePathView::setPathItemCount(int i) return; d->pathItems = i; d->regenerate(); + pathItemCountChanged(); } QPointF QDeclarativePathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) const diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h index 709a4fc..df9c6ae 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h @@ -56,15 +56,15 @@ class Q_DECLARATIVE_EXPORT QDeclarativePathView : public QDeclarativeItem { Q_OBJECT - Q_PROPERTY(QVariant model READ model WRITE setModel) - Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath) + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(qreal offset READ offset WRITE setOffset NOTIFY offsetChanged) - Q_PROPERTY(qreal snapPosition READ snapPosition WRITE setSnapPosition) - Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin) + Q_PROPERTY(qreal snapPosition READ snapPosition WRITE setSnapPosition NOTIFY snapPositionChanged) + Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin NOTIFY dragMarginChanged) Q_PROPERTY(int count READ count) - Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate) - Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount) + Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged) public: QDeclarativePathView(QDeclarativeItem *parent=0); @@ -101,6 +101,12 @@ public: Q_SIGNALS: void currentIndexChanged(); void offsetChanged(); + void modelChanged(); + void pathChanged(); + void dragMarginChanged(); + void snapPositionChanged(); + void delegateChanged(); + void pathItemCountChanged(); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h index ca50910..6344a8a 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h @@ -60,6 +60,7 @@ #include <qdeclarative.h> #include <qdeclarativeanimation_p_p.h> +#include <qdeclarativeguard_p.h> #include <qdatetime.h> @@ -132,7 +133,7 @@ public: int pathOffset; int requestedIndex; QList<QDeclarativeItem *> items; - QGuard<QDeclarativeVisualModel> model; + QDeclarativeGuard<QDeclarativeVisualModel> model; QVariant modelVariant; enum MovementReason { Other, Key, Mouse }; MovementReason moveReason; diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index d534f21..05fe0f7 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -393,9 +393,10 @@ void QDeclarativeRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, void QDeclarativeRectangle::drawRect(QPainter &p) { Q_D(QDeclarativeRectangle); - if (d->gradient && d->gradient->gradient()) { + if ((d->gradient && d->gradient->gradient()) + || d->radius > width()/2 || d->radius > height()/2) { // XXX This path is still slower than the image path - // Image path won't work for gradients though + // Image path won't work for gradients or invalid radius though bool oldAA = p.testRenderHint(QPainter::Antialiasing); if (d->smooth) p.setRenderHint(QPainter::Antialiasing); @@ -405,11 +406,23 @@ void QDeclarativeRectangle::drawRect(QPainter &p) } else { p.setPen(Qt::NoPen); } - p.setBrush(*d->gradient->gradient()); - if (d->radius > 0.) - p.drawRoundedRect(0, 0, width(), height(), d->radius, d->radius); + if (d->gradient && d->gradient->gradient()) + p.setBrush(*d->gradient->gradient()); else - p.drawRect(0, 0, width(), height()); + p.setBrush(d->color); + const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0; + QRectF rect; + if (pw%2) + rect = QRectF(0.5, 0.5, width()-1, height()-1); + else + rect = QRectF(0, 0, width(), height()); + qreal radius = d->radius; + if (radius > width()/2 || radius > height()/2) + radius = qMin(width()/2, height()/2); + if (radius > 0.) + p.drawRoundedRect(rect, radius, radius); + else + p.drawRect(rect); if (d->smooth) p.setRenderHint(QPainter::Antialiasing, oldAA); } else { diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 8e44b26..be73b39 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -613,6 +613,11 @@ void QDeclarativeTextEdit::setPersistentSelection(bool on) emit persistentSelectionChanged(d->persistentSelection); } +/* + \qmlproperty number TextEdit::textMargin + + The margin, in pixels, around the text in the TextEdit. +*/ qreal QDeclarativeTextEdit::textMargin() const { Q_D(const QDeclarativeTextEdit); diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index cd72ef9..55f1c89 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -53,6 +53,7 @@ #include <qdeclarativedeclarativedata_p.h> #include <qdeclarativepropertycache_p.h> #include <qdeclarativeguard_p.h> +#include <qdeclarativeglobal_p.h> #include <qlistmodelinterface_p.h> #include <qhash.h> @@ -80,6 +81,14 @@ public: static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->emitChildrenChanged(); } + static int children_count(QDeclarativeListProperty<QDeclarativeItem> *prop) { + return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.count(); + } + + static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *prop, int index) { + return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index); + } + void itemAppended() { Q_Q(QDeclarativeVisualItemModel); QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last()); @@ -135,7 +144,8 @@ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel() QDeclarativeListProperty<QDeclarativeItem> QDeclarativeVisualItemModel::children() { Q_D(QDeclarativeVisualItemModel); - return QDeclarativeListProperty<QDeclarativeItem>(this, d, QDeclarativeVisualItemModelPrivate::children_append); + return QDeclarativeListProperty<QDeclarativeItem>(this, d, d->children_append, + d->children_count, d->children_at); } /*! @@ -473,7 +483,7 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId) QDeclarativeVisualDataModelData::QDeclarativeVisualDataModelData(int index, QDeclarativeVisualDataModel *model) -: m_index(index), m_model(model), +: m_index(index), m_model(model), m_meta(new QDeclarativeVisualDataModelDataMetaObject(this, QDeclarativeVisualDataModelPrivate::get(model)->m_delegateDataType)) { QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(model); @@ -540,7 +550,7 @@ QVariant QDeclarativeVisualDataModelPartsMetaObject::initialValue(int id) } QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeVisualDataModel *parent) -: QObject(parent), model(parent) +: QObject(parent), model(parent) { new QDeclarativeVisualDataModelPartsMetaObject(this); } @@ -830,7 +840,7 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate) Rectangle { height: 25; width: 100 Text { text: path } - MouseRegion { + MouseArea { anchors.fill: parent; onClicked: myModel.setRoot(path) } @@ -959,7 +969,7 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q QObject *QDeclarativeVisualDataModel::parts() { Q_D(QDeclarativeVisualDataModel); - if (!d->m_parts) + if (!d->m_parts) d->m_parts = new QDeclarativeVisualDataModelParts(this); return d->m_parts; } @@ -984,8 +994,8 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray if (complete) d->m_delegate->completeCreate(); if (nobj) { - ctxt->setParent(nobj); - data->setParent(nobj); + QDeclarative_setParent_noEvent(ctxt, nobj); + QDeclarative_setParent_noEvent(data, nobj); d->m_cache.insertItem(index, nobj); if (QDeclarativePackage *package = qobject_cast<QDeclarativePackage *>(nobj)) emit createdPackage(index, package); @@ -1268,7 +1278,6 @@ void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const void QDeclarativeVisualDataModel::_q_modelReset() { - Q_D(QDeclarativeVisualDataModel); emit modelReset(); } diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index 7cf81b2..493ad25 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -1020,7 +1020,7 @@ case $rule_number: { JsIdentifier: T_ON ; /. case $rule_number: { - QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp index 0677bc5..89493ff 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp +++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h index 2b2e3d1..32bb12b 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h +++ b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeJSGrammar { public: - enum { + enum VariousConstants { EOF_SYMBOL = 0, REDUCE_HERE = 100, SHIFT_THERE = 99, diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index fd9e690..c86e047 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -516,7 +516,7 @@ case 66: { } case 67: { - QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index ec5809d..1a714f0 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QDeclarativeAbstractBinding +class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding { public: QDeclarativeAbstractBinding(); @@ -101,7 +101,7 @@ private: class QDeclarativeContext; class QDeclarativeBindingPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding +class Q_DECLARATIVE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding { Q_OBJECT public: diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 5da207d..5a2f3b5 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -65,6 +65,7 @@ #include "qdeclarativescriptparser_p.h" #include "qdeclarativebinding_p.h" #include "qdeclarativecompiledbindings_p.h" +#include "qdeclarativeglobalscriptclass_p.h" #include <qfxperf_p_p.h> @@ -113,32 +114,6 @@ QList<QDeclarativeError> QDeclarativeCompiler::errors() const } /*! - Returns true if \a val is a legal object id, false otherwise. - - Legal ids must start with a lower-case letter or underscore, and contain only - letters, numbers and underscores. -*/ -bool QDeclarativeCompiler::isValidId(const QString &val) -{ - if (val.isEmpty()) - return false; - - if (val.at(0).isLetter() && !val.at(0).isLower()) { - qWarning().nospace() << "id " << val << " is invalid: ids cannot start with uppercase letters"; - return false; - } - - QChar u(QLatin1Char('_')); - for (int ii = 0; ii < val.count(); ++ii) - if (val.at(ii) != u && - ((ii == 0 && !val.at(ii).isLetter()) || - (ii != 0 && !val.at(ii).isLetterOrNumber())) ) - return false; - - return true; -} - -/*! Returns true if \a name refers to an attached property, false otherwise. Attached property names are those that start with a capital letter. @@ -718,6 +693,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) BindingContext objCtxt(obj); // Create the synthesized meta object, ignoring aliases + COMPILE_CHECK(checkDynamicMeta(obj)); COMPILE_CHECK(mergeDynamicMetaProperties(obj)); COMPILE_CHECK(buildDynamicMeta(obj, IgnoreAliases)); @@ -1007,12 +983,15 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj) } else if (v->type == Value::SignalExpression) { + BindingContext ctxt = compileState.signalExpressions.value(v); + QDeclarativeInstruction store; store.type = QDeclarativeInstruction::StoreSignal; store.line = v->location.start.line; store.storeSignal.signalIndex = prop->index; store.storeSignal.value = output->indexForString(v->value.asScript().trimmed()); + store.storeSignal.context = ctxt.stack; output->bytecode << store; } @@ -1139,10 +1118,11 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj, if (obj->properties.count()) idProp = *obj->properties.begin(); - if (idProp && (idProp->value || idProp->values.count() > 1 || !isValidId(idProp->values.first()->primitive()))) - COMPILE_EXCEPTION(idProp, QCoreApplication::translate("QDeclarativeCompiler","Invalid component id specification")); - if (idProp) { + if (idProp->value || idProp->values.count() > 1 || idProp->values.at(0)->object) + COMPILE_EXCEPTION(idProp, QCoreApplication::translate("QDeclarativeCompiler","Invalid component id specification")); + COMPILE_CHECK(checkValidId(idProp->values.first(), idProp->values.first()->primitive())); + QString idVal = idProp->values.first()->primitive(); if (compileState.ids.contains(idVal)) @@ -1344,7 +1324,7 @@ QMetaMethod QDeclarativeCompiler::findSignalByName(const QMetaObject *mo, const } bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj, - const BindingContext &ctxt) + const BindingContext &ctxt) { Q_ASSERT(obj->metaObject()); Q_ASSERT(!prop->isEmpty()); @@ -1365,7 +1345,7 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl } else { - if (prop->value || prop->values.count() > 1) + if (prop->value || prop->values.count() != 1) COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Incorrectly specified signal")); prop->index = sigIdx; @@ -1380,6 +1360,8 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl QString script = prop->values.at(0)->value.asScript().trimmed(); if (script.isEmpty()) COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Empty signal assignment")); + + compileState.signalExpressions.insert(prop->values.at(0), ctxt); } } @@ -1623,6 +1605,10 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeParser::Property *p for (int ii = 0; ii < prop->values.count(); ++ii) { QDeclarativeParser::Value *v = prop->values.at(ii); + Q_ASSERT(v->type == Value::CreatedObject || + v->type == Value::PropertyBinding || + v->type == Value::Literal); + if (v->type == Value::CreatedObject) { genObject(v->object); @@ -1652,7 +1638,27 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeParser::Property *p output->bytecode << store; } - } else if (v->type == Value::ValueSource) { + } else if (v->type == Value::PropertyBinding) { + + genBindingAssignment(v, prop, obj, valueTypeProperty); + + } else if (v->type == Value::Literal) { + + QMetaProperty mp = obj->metaObject()->property(prop->index); + genLiteralAssignment(mp, v); + + } + + } + + for (int ii = 0; ii < prop->onValues.count(); ++ii) { + + QDeclarativeParser::Value *v = prop->onValues.at(ii); + + Q_ASSERT(v->type == Value::ValueSource || + v->type == Value::ValueInterceptor); + + if (v->type == Value::ValueSource) { genObject(v->object); QDeclarativeInstruction store; @@ -1685,16 +1691,6 @@ void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeParser::Property *p QDeclarativeType *valueType = toQmlType(v->object); store.assignValueInterceptor.castValue = valueType->propertyValueInterceptorCast(); output->bytecode << store; - - } else if (v->type == Value::PropertyBinding) { - - genBindingAssignment(v, prop, obj, valueTypeProperty); - - } else if (v->type == Value::Literal) { - - QMetaProperty mp = obj->metaObject()->property(prop->index); - genLiteralAssignment(mp, v); - } } @@ -1711,8 +1707,7 @@ bool QDeclarativeCompiler::buildIdProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Value *idValue = prop->values.at(0); QString val = idValue->primitive(); - if (!isValidId(val)) - COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","\"%1\" is not a valid object id").arg(val)); + COMPILE_CHECK(checkValidId(idValue, val)); // We disallow id's that conflict with import prefixes and types QDeclarativeEnginePrivate::ImportedNamespace *ns = 0; @@ -1793,19 +1788,25 @@ bool QDeclarativeCompiler::buildAttachedProperty(QDeclarativeParser::Property *p // } // font is a nested property. pointSize and family are not. bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *prop, - QDeclarativeParser::Object *obj, - const BindingContext &ctxt) + QDeclarativeParser::Object *obj, + const BindingContext &ctxt) { Q_ASSERT(prop->type != 0); Q_ASSERT(prop->index != -1); - if (prop->values.count()) - COMPILE_EXCEPTION(prop->values.first(), QCoreApplication::translate("QDeclarativeCompiler", "Invalid value in grouped property")); - - if (prop->type < (int)QVariant::UserType) { + if (QDeclarativeValueTypeFactory::isValueType(prop->type)) { QDeclarativeEnginePrivate *ep = static_cast<QDeclarativeEnginePrivate *>(QObjectPrivate::get(engine)); if (prop->type >= 0 /* QVariant == -1 */ && ep->valueTypes[prop->type]) { + + if (prop->values.count()) { + if (prop->values.at(0)->location < prop->value->location) { + COMPILE_EXCEPTION(prop->value, QCoreApplication::translate("QDeclarativeCompiler", "Property has already been assigned a value")); + } else { + COMPILE_EXCEPTION(prop->values.at(0), QCoreApplication::translate("QDeclarativeCompiler", "Property has already been assigned a value")); + } + } + COMPILE_CHECK(buildValueTypeProperty(ep->valueTypes[prop->type], prop->value, obj, ctxt.incr())); obj->addValueTypeProperty(prop); @@ -1820,6 +1821,9 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *pr if (!prop->value->metatype) COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid grouped property access")); + if (prop->values.count()) + COMPILE_EXCEPTION(prop->values.at(0), QCoreApplication::translate("QDeclarativeCompiler", "Cannot assign a value directly to a grouped property")); + obj->addGroupedProperty(prop); COMPILE_CHECK(buildSubObject(prop->value, ctxt.incr())); @@ -1829,9 +1833,9 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *pr } bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, - QDeclarativeParser::Object *obj, - QDeclarativeParser::Object *baseObj, - const BindingContext &ctxt) + QDeclarativeParser::Object *obj, + QDeclarativeParser::Object *baseObj, + const BindingContext &ctxt) { if (obj->defaultProperty) COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Invalid property use")); @@ -1848,37 +1852,36 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, if (prop->value) COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Property assignment expected")); - if (prop->values.count() != 1) + if (prop->values.count() > 1) { COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Single property assignment expected")); + } else if (prop->values.count()) { + Value *value = prop->values.at(0); - Value *value = prop->values.at(0); - - if (value->object) { - bool isPropertyValue = output->types.at(value->object->type).type->propertyValueSourceCast() != -1; - bool isPropertyInterceptor = output->types.at(value->object->type).type->propertyValueInterceptorCast() != -1; - if (!isPropertyValue && !isPropertyInterceptor) { + if (value->object) { COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Unexpected object assignment")); - } else { - COMPILE_CHECK(buildObject(value->object, ctxt)); - - if (isPropertyInterceptor && baseObj->synthdata.isEmpty()) - buildDynamicMeta(baseObj, ForceCreation); - value->type = isPropertyValue ? Value::ValueSource : Value::ValueInterceptor; + } else if (value->value.isScript()) { + // ### Check for writability + BindingReference reference; + reference.expression = value->value; + reference.property = prop; + reference.value = value; + reference.bindingContext = ctxt; + reference.bindingContext.owner++; + addBindingReference(reference); + value->type = Value::PropertyBinding; + } else { + COMPILE_CHECK(testLiteralAssignment(p, value)); + value->type = Value::Literal; } - } else if (value->value.isScript()) { - // ### Check for writability - BindingReference reference; - reference.expression = value->value; - reference.property = prop; - reference.value = value; - reference.bindingContext = ctxt; - reference.bindingContext.owner++; - addBindingReference(reference); - value->type = Value::PropertyBinding; - } else { - COMPILE_CHECK(testLiteralAssignment(p, value)); - value->type = Value::Literal; } + + for (int ii = 0; ii < prop->onValues.count(); ++ii) { + Value *v = prop->onValues.at(ii); + Q_ASSERT(v->object); + + COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, baseObj, v, ctxt)); + } + obj->addValueProperty(prop); } @@ -1886,13 +1889,11 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, } // Build assignments to QML lists. QML lists are properties of type -// QList<T *> * and QDeclarativeList<T *> *. -// -// QList<T *> * types can accept a list of objects, or a single binding -// QDeclarativeList<T *> * types can accept a list of objects +// QDeclarativeListProperty<T>. List properties can accept a list of +// objects, or a single binding. bool QDeclarativeCompiler::buildListProperty(QDeclarativeParser::Property *prop, - QDeclarativeParser::Object *obj, - const BindingContext &ctxt) + QDeclarativeParser::Object *obj, + const BindingContext &ctxt) { Q_ASSERT(QDeclarativeEnginePrivate::get(engine)->isList(prop->type)); @@ -1950,20 +1951,6 @@ bool QDeclarativeCompiler::buildScriptStringProperty(QDeclarativeParser::Propert } // Compile regular property assignments of the form "property: <value>" -// -// ### The following problems exist -// -// There is no distinction between how "lists" of values are specified. This -// Item { -// children: Item {} -// children: Item {} -// } -// is identical to -// Item { -// children: [ Item {}, Item {} ] -// } -// -// We allow assignming multiple values to single value properties bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj, const BindingContext &ctxt) @@ -1983,14 +1970,21 @@ bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeParser::Property } } + for (int ii = 0; ii < prop->onValues.count(); ++ii) { + Value *v = prop->onValues.at(ii); + + Q_ASSERT(v->object); + COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, obj, v, ctxt)); + } + return true; } // Compile assigning a single object instance to a regular property bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Property *prop, - QDeclarativeParser::Object *obj, - QDeclarativeParser::Value *v, - const BindingContext &ctxt) + QDeclarativeParser::Object *obj, + QDeclarativeParser::Value *v, + const BindingContext &ctxt) { Q_ASSERT(prop->index != -1); Q_ASSERT(v->object->type != -1); @@ -2019,15 +2013,6 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Pro v->object->metatype = output->types.at(v->object->type).metaObject(); Q_ASSERT(v->object->metaObject()); - // Will be true if the assigned type inherits QDeclarativePropertyValueSource - bool isPropertyValue = false; - // Will be true if the assigned type inherits QDeclarativePropertyValueInterceptor - bool isPropertyInterceptor = false; - if (QDeclarativeType *valueType = toQmlType(v->object)) { - isPropertyValue = valueType->propertyValueSourceCast() != -1; - isPropertyInterceptor = valueType->propertyValueInterceptorCast() != -1; - } - // We want to raw metaObject here as the raw metaobject is the // actual property type before we applied any extensions that might // effect the properties on the type, but don't effect assignability @@ -2063,13 +2048,6 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Pro component->getDefaultProperty()->addValue(componentValue); v->object = component; COMPILE_CHECK(buildPropertyObjectAssignment(prop, obj, v, ctxt)); - } else if (isPropertyValue || isPropertyInterceptor) { - // Assign as a property value source - COMPILE_CHECK(buildObject(v->object, ctxt)); - - if (isPropertyInterceptor && prop->parent->synthdata.isEmpty()) - buildDynamicMeta(prop->parent, ForceCreation); - v->type = isPropertyValue ? Value::ValueSource : Value::ValueInterceptor; } else { COMPILE_EXCEPTION(v->object, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign object to property")); } @@ -2078,6 +2056,55 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Pro return true; } +// Compile assigning a single object instance to a regular property using the "on" syntax. +// +// For example: +// Item { +// NumberAnimation on x { } +// } +bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeParser::Property *prop, + QDeclarativeParser::Object *obj, + QDeclarativeParser::Object *baseObj, + QDeclarativeParser::Value *v, + const BindingContext &ctxt) +{ + Q_ASSERT(prop->index != -1); + Q_ASSERT(v->object->type != -1); + + if (!obj->metaObject()->property(prop->index).isWritable()) + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop->name))); + + + // Normally buildObject() will set this up, but we need the static + // meta object earlier to test for assignability. It doesn't matter + // that there may still be outstanding synthesized meta object changes + // on this type, as they are not relevant for assignability testing + v->object->metatype = output->types.at(v->object->type).metaObject(); + Q_ASSERT(v->object->metaObject()); + + // Will be true if the assigned type inherits QDeclarativePropertyValueSource + bool isPropertyValue = false; + // Will be true if the assigned type inherits QDeclarativePropertyValueInterceptor + bool isPropertyInterceptor = false; + if (QDeclarativeType *valueType = toQmlType(v->object)) { + isPropertyValue = valueType->propertyValueSourceCast() != -1; + isPropertyInterceptor = valueType->propertyValueInterceptorCast() != -1; + } + + if (isPropertyValue || isPropertyInterceptor) { + // Assign as a property value source + COMPILE_CHECK(buildObject(v->object, ctxt)); + + if (isPropertyInterceptor && prop->parent->synthdata.isEmpty()) + buildDynamicMeta(baseObj, ForceCreation); + v->type = isPropertyValue ? Value::ValueSource : Value::ValueInterceptor; + } else { + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","\"%1\" cannot operate on \"%2\"").arg(v->object->typeName.constData()).arg(prop->name.constData())); + } + + return true; +} + // Compile assigning a literal or binding to a regular property bool QDeclarativeCompiler::buildPropertyLiteralAssignment(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj, @@ -2203,10 +2230,13 @@ bool QDeclarativeCompiler::mergeDynamicMetaProperties(QDeclarativeParser::Object continue; Property *property = 0; - if (p.isDefaultProperty) + if (p.isDefaultProperty) { property = obj->getDefaultProperty(); - else + } else { property = obj->getProperty(p.name); + if (!property->values.isEmpty()) + COMPILE_EXCEPTION(property, QCoreApplication::translate("QDeclarativeCompiler","Property value set multiple times")); + } if (property->value) COMPILE_EXCEPTION(property, QCoreApplication::translate("QDeclarativeCompiler","Invalid property nesting")); @@ -2233,8 +2263,6 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn obj->dynamicSlots.isEmpty()) return true; - COMPILE_CHECK(checkDynamicMeta(obj)); - QByteArray dynamicData(sizeof(QDeclarativeVMEMetaData), (char)0); QByteArray newClassName = obj->metatype->className(); @@ -2437,6 +2465,31 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn return true; } +bool QDeclarativeCompiler::checkValidId(QDeclarativeParser::Value *v, const QString &val) +{ + if (val.isEmpty()) + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "Invalid empty ID")); + + if (val.at(0).isLetter() && !val.at(0).isLower()) + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs cannot start with an uppercase letter")); + + QChar u(QLatin1Char('_')); + for (int ii = 0; ii < val.count(); ++ii) { + + if (ii == 0 && !val.at(ii).isLetter() && val.at(ii) != u) { + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs must start with a letter or underscore")); + } else if (ii != 0 && !val.at(ii).isLetterOrNumber() && val.at(ii) != u) { + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs must contain only letters, numbers, and underscores")); + } + + } + + if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(val)) + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "ID illegally masks global JavaScript property")); + + return true; +} + #include <qdeclarativejsparser_p.h> static QStringList astNodeToStringList(QDeclarativeJS::AST::Node *node) @@ -2560,9 +2613,9 @@ bool QDeclarativeCompiler::buildBinding(QDeclarativeParser::Value *value, } void QDeclarativeCompiler::genBindingAssignment(QDeclarativeParser::Value *binding, - QDeclarativeParser::Property *prop, - QDeclarativeParser::Object *obj, - QDeclarativeParser::Property *valueTypeProperty) + QDeclarativeParser::Property *prop, + QDeclarativeParser::Object *obj, + QDeclarativeParser::Property *valueTypeProperty) { Q_UNUSED(obj); Q_ASSERT(compileState.bindings.contains(binding)); diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h index 2ea3366..cca42e2 100644 --- a/src/declarative/qml/qdeclarativecompiler_p.h +++ b/src/declarative/qml/qdeclarativecompiler_p.h @@ -155,7 +155,6 @@ public: bool isError() const; QList<QDeclarativeError> errors() const; - static bool isValidId(const QString &); static bool isAttachedPropertyName(const QByteArray &); static bool isSignalPropertyName(const QByteArray &); @@ -219,6 +218,11 @@ private: QDeclarativeParser::Object *obj, QDeclarativeParser::Value *value, const BindingContext &ctxt); + bool buildPropertyOnAssignment(QDeclarativeParser::Property *prop, + QDeclarativeParser::Object *obj, + QDeclarativeParser::Object *baseObj, + QDeclarativeParser::Value *value, + const BindingContext &ctxt); bool buildPropertyLiteralAssignment(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj, QDeclarativeParser::Value *value, @@ -242,6 +246,7 @@ private: QDeclarativeParser::Object *obj, const QDeclarativeParser::Object::DynamicProperty &); bool completeComponentBuild(); + bool checkValidId(QDeclarativeParser::Value *, const QString &); void genObject(QDeclarativeParser::Object *obj); @@ -302,6 +307,7 @@ private: QByteArray compiledBindingData; QHash<QDeclarativeParser::Value *, BindingReference> bindings; + QHash<QDeclarativeParser::Value *, BindingContext> signalExpressions; QList<QDeclarativeParser::Object *> aliasingObjects; QDeclarativeParser::Object *root; }; diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 6a2d2d1..d6bb216 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -437,6 +437,13 @@ void QDeclarativeComponent::loadUrl(const QUrl &url) else d->url = url; + if (url.isEmpty()) { + QDeclarativeError error; + error.setDescription(tr("Invalid empty URL")); + d->state.errors << error; + return; + } + QDeclarativeCompositeTypeData *data = QDeclarativeEnginePrivate::get(d->engine)->typeManager.get(d->url); diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index b244cd8..f70e143 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -47,6 +47,7 @@ #include "qdeclarativeengine.h" #include "qdeclarativecompiledbindings_p.h" #include "qdeclarativeinfo.h" +#include "qdeclarativeglobalscriptclass_p.h" #include <qscriptengine.h> #include <QtCore/qvarlengtharray.h> @@ -74,10 +75,13 @@ void QDeclarativeContextPrivate::addScript(const QDeclarativeParser::Object::Scr QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine); QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); + scriptContext->pushScope(enginePriv->contextClass->newContext(q, scopeObject)); + scriptContext->pushScope(enginePriv->globalClass->globalObject()); QScriptValue scope = scriptEngine->newObject(); scriptContext->setActivationObject(scope); + scriptContext->pushScope(scope); for (int ii = 0; ii < script.codes.count(); ++ii) { scriptEngine->evaluate(script.codes.at(ii), script.files.at(ii), script.lineNumbers.at(ii)); @@ -480,7 +484,10 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const if (!value.isValid() && parentContext()) value = parentContext()->contextProperty(name); } else { - value = d->propertyValues[idx]; + if (idx >= d->propertyValues.count()) + value = QVariant::fromValue(d->idValues[idx - d->propertyValues.count()].data()); + else + value = d->propertyValues[idx]; } return value; diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp index 7deed0b..d6305d8 100644 --- a/src/declarative/qml/qdeclarativecontextscriptclass.cpp +++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp @@ -50,10 +50,11 @@ QT_BEGIN_NAMESPACE struct ContextData : public QScriptDeclarativeClass::Object { - ContextData() : isSharedContext(true) {} - ContextData(QDeclarativeContext *c, QObject *o) : context(c), scopeObject(o), isSharedContext(false) {} + ContextData() : overrideObject(0), isSharedContext(true) {} + ContextData(QDeclarativeContext *c, QObject *o) : context(c), scopeObject(o), overrideObject(0), isSharedContext(false) {} QDeclarativeGuard<QDeclarativeContext> context; QDeclarativeGuard<QObject> scopeObject; + QObject *overrideObject; bool isSharedContext; QDeclarativeContext *getContext(QDeclarativeEngine *engine) { @@ -110,6 +111,17 @@ QDeclarativeContext *QDeclarativeContextScriptClass::contextFromValue(const QScr return data->getContext(engine); } +QObject *QDeclarativeContextScriptClass::setOverrideObject(QScriptValue &v, QObject *override) +{ + if (scriptClass(v) != this) + return 0; + + ContextData *data = (ContextData *)object(v); + QObject *rv = data->overrideObject; + data->overrideObject = override; + return rv; +} + QScriptClass::QueryFlags QDeclarativeContextScriptClass::queryProperty(Object *object, const Identifier &name, QScriptClass::QueryFlags flags) @@ -127,6 +139,20 @@ QDeclarativeContextScriptClass::queryProperty(Object *object, const Identifier & if (!bindContext) return 0; + QObject *overrideObject = ((ContextData *)object)->overrideObject; + if (overrideObject) { + QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + QScriptClass::QueryFlags rv = + ep->objectClass->queryProperty(overrideObject, name, flags, bindContext, + QDeclarativeObjectScriptClass::ImplicitObject | + QDeclarativeObjectScriptClass::SkipAttachedProperties); + if (rv) { + lastScopeObject = overrideObject; + lastContext = bindContext; + return rv; + } + } + bool includeTypes = true; while (bindContext) { QScriptClass::QueryFlags rv = diff --git a/src/declarative/qml/qdeclarativecontextscriptclass_p.h b/src/declarative/qml/qdeclarativecontextscriptclass_p.h index 26086ec..4b0dca0 100644 --- a/src/declarative/qml/qdeclarativecontextscriptclass_p.h +++ b/src/declarative/qml/qdeclarativecontextscriptclass_p.h @@ -70,6 +70,7 @@ public: QScriptValue newSharedContext(); QDeclarativeContext *contextFromValue(const QScriptValue &); + QObject *setOverrideObject(QScriptValue &, QObject *); protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h index 2c92419..ae40130 100644 --- a/src/declarative/qml/qdeclarativedeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h @@ -103,7 +103,10 @@ public: static QDeclarativeDeclarativeData *get(const QObject *object, bool create = false) { QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object)); - if (priv->declarativeData) { + if (priv->wasDeleted) { + Q_ASSERT(!create); + return 0; + } else if (priv->declarativeData) { return static_cast<QDeclarativeDeclarativeData *>(priv->declarativeData); } else if (create) { priv->declarativeData = new QDeclarativeDeclarativeData; @@ -117,6 +120,11 @@ public: template<class T> void QDeclarativeGuard<T>::addGuard() { + if (QObjectPrivate::get(o)->wasDeleted) { + if (prev) remGuard(); + return; + } + QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(o, true); next = data->guards; if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = &next; diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp index 6c81f34..cb56ead 100644 --- a/src/declarative/qml/qdeclarativedom.cpp +++ b/src/declarative/qml/qdeclarativedom.cpp @@ -374,7 +374,10 @@ QDeclarativeDomValue QDeclarativeDomProperty::value() const QDeclarativeDomValue rv; if (d->property) { rv.d->property = d->property; - rv.d->value = d->property->values.at(0); + if (d->property->values.count()) + rv.d->value = d->property->values.at(0); + else + rv.d->value = d->property->onValues.at(0); rv.d->property->addref(); rv.d->value->addref(); } @@ -505,7 +508,7 @@ int QDeclarativeDomDynamicProperty::propertyType() const QByteArray QDeclarativeDomDynamicProperty::propertyTypeName() const { - if (isValid()) + if (isValid()) return d->property.customType; return QByteArray(); @@ -1181,7 +1184,7 @@ QDeclarativeDomObject QDeclarativeDomValueValueSource::object() const \qml Rectangle { - x: Behavior { NumberAnimation { duration: 500 } } + Behavior on x { NumberAnimation { duration: 500 } } } \endqml */ @@ -1225,7 +1228,7 @@ QDeclarativeDomValueValueInterceptor &QDeclarativeDomValueValueInterceptor::oper returned. \qml Rectangle { - x: Behavior { NumberAnimation { duration: 500 } } + Behavior on x { NumberAnimation { duration: 500 } } } \endqml */ @@ -1346,7 +1349,7 @@ QDeclarativeDomValue::Type QDeclarativeDomValue::type() const { if (d->property) if (QDeclarativeMetaType::isList(d->property->type) || - (d->property && d->property->values.count() > 1)) + (d->property && (d->property->values.count() + d->property->onValues.count()) > 1)) return List; QDeclarativeParser::Value *value = d->value; @@ -1628,6 +1631,13 @@ QList<QDeclarativeDomValue> QDeclarativeDomList::values() const rv << v; } + for (int ii = 0; ii < d->property->onValues.count(); ++ii) { + QDeclarativeDomValue v; + v.d->value = d->property->onValues.at(ii); + v.d->value->addref(); + rv << v; + } + return rv; } diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index af75e98..7ce2d0b 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -236,9 +236,13 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2)); } + //date/time formatting + qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2)); + qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2)); + qtObject.setProperty(QLatin1String("formatDateTime"),newFunction(QDeclarativeEnginePrivate::formatDateTime, 2)); + //misc methods qtObject.setProperty(QLatin1String("closestAngle"), newFunction(QDeclarativeEnginePrivate::closestAngle, 2)); - qtObject.setProperty(QLatin1String("playSound"), newFunction(QDeclarativeEnginePrivate::playSound, 1)); qtObject.setProperty(QLatin1String("openUrlExternally"),newFunction(QDeclarativeEnginePrivate::desktopOpenUrl, 1)); qtObject.setProperty(QLatin1String("md5"),newFunction(QDeclarativeEnginePrivate::md5, 1)); qtObject.setProperty(QLatin1String("btoa"),newFunction(QDeclarativeEnginePrivate::btoa, 1)); @@ -936,6 +940,66 @@ QScriptValue QDeclarativeEnginePrivate::vector(QScriptContext *ctxt, QScriptEngi return engine->newVariant(qVariantFromValue(QVector3D(x, y, z))); } +QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine) +{ + int argCount = ctxt->argumentCount(); + if(argCount == 0 || argCount > 2) + return engine->nullValue(); + + QDate date = ctxt->argument(0).toDateTime().date(); + Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate; + if (argCount == 2) { + if (ctxt->argument(1).isString()) { + QString format = ctxt->argument(1).toString(); + return engine->newVariant(qVariantFromValue(date.toString(format))); + } else if (ctxt->argument(1).isNumber()) { + enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32()); + } else + return engine->nullValue(); + } + return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); +} + +QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptEngine*engine) +{ + int argCount = ctxt->argumentCount(); + if(argCount == 0 || argCount > 2) + return engine->nullValue(); + + QTime date = ctxt->argument(0).toDateTime().time(); + Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate; + if (argCount == 2) { + if (ctxt->argument(1).isString()) { + QString format = ctxt->argument(1).toString(); + return engine->newVariant(qVariantFromValue(date.toString(format))); + } else if (ctxt->argument(1).isNumber()) { + enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32()); + } else + return engine->nullValue(); + } + return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); +} + +QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScriptEngine*engine) +{ + int argCount = ctxt->argumentCount(); + if(argCount == 0 || argCount > 2) + return engine->nullValue(); + + QDateTime date = ctxt->argument(0).toDateTime(); + Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate; + if (argCount == 2) { + if (ctxt->argument(1).isString()) { + QString format = ctxt->argument(1).toString(); + return engine->newVariant(qVariantFromValue(date.toString(format))); + } else if (ctxt->argument(1).isNumber()) { + enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32()); + } else + return engine->nullValue(); + } + return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); +} + QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine *engine) { int argCount = ctxt->argumentCount(); @@ -1040,30 +1104,6 @@ QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngi return qScriptValueFromValue(engine, qVariantFromValue(color)); } -QScriptValue QDeclarativeEnginePrivate::playSound(QScriptContext *ctxt, QScriptEngine *engine) -{ - if (ctxt->argumentCount() != 1) - return engine->undefinedValue(); - - QUrl url(ctxt->argument(0).toString()); - - QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); - if (url.isRelative()) { - QDeclarativeContext *context = enginePriv->getContext(ctxt); - if (!context) - return engine->undefinedValue(); - - url = context->resolvedUrl(url); - } - - if (url.scheme() == QLatin1String("file")) { - - QSound::play(url.toLocalFile()); - - } - return engine->undefinedValue(); -} - QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QScriptEngine *e) { if(ctxt->argumentCount() < 1) @@ -1383,7 +1423,11 @@ public: paths += QFileInfo(base.toLocalFile()).path(); paths += importPath; paths += QDeclarativeEnginePrivate::get(engine)->environmentImportPath; +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) QString builtinPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); +#else + QString builtinPath; +#endif if (!builtinPath.isEmpty()) paths += builtinPath; @@ -1687,6 +1731,7 @@ QString QDeclarativeEngine::offlineStoragePath() const \internal Returns the result of the merge of \a baseName with \a dir, \a suffixes, and \a prefix. + The \a prefix must contain the dot. */ QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString &baseName, const QStringList &suffixes, @@ -1696,7 +1741,6 @@ QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString QString pluginFileName = prefix; pluginFileName += baseName; - pluginFileName += QLatin1Char('.'); pluginFileName += suffix; QFileInfo fileInfo(dir, pluginFileName); @@ -1728,14 +1772,26 @@ QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString &baseName) { #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) - return resolvePlugin(dir, baseName, QStringList(QLatin1String("dll"))); + return resolvePlugin(dir, baseName, + QStringList() +# ifdef QT_DEBUG + << QLatin1String("d.dll") // try a qmake-style debug build first +# endif + << QLatin1String(".dll")); #elif defined(Q_OS_SYMBIAN) - return resolvePlugin(dir, baseName, QStringList() << QLatin1String("dll") << QLatin1String("qtplugin")); + return resolvePlugin(dir, baseName, + QStringList() + << QLatin1String(".dll") + << QLatin1String(".qtplugin")); #else # if defined(Q_OS_DARWIN) - return resolvePlugin(dir, baseName, QStringList() << QLatin1String("dylib") << QLatin1String("so") << QLatin1String("bundle"), + return resolvePlugin(dir, baseName, + QStringList() + << QLatin1String(".dylib") + << QLatin1String(".so") + << QLatin1String(".bundle"), QLatin1String("lib")); # else // Generic Unix QStringList validSuffixList; @@ -1746,14 +1802,14 @@ QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString "In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit), the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix." */ - validSuffixList << QLatin1String("sl"); + validSuffixList << QLatin1String(".sl"); # if defined __ia64 - validSuffixList << QLatin1String("so"); + validSuffixList << QLatin1String(".so"); # endif # elif defined(Q_OS_AIX) - validSuffixList << QLatin1String("a") << QLatin1String("so"); + validSuffixList << QLatin1String(".a") << QLatin1String(".so"); # elif defined(Q_OS_UNIX) - validSuffixList << QLatin1String("so"); + validSuffixList << QLatin1String(".so"); # endif // Examples of valid library names: diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index 0359f98..459a325 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -238,7 +238,8 @@ public: QHash<const QMetaObject *, QDeclarativePropertyCache *> propertyCache; QDeclarativePropertyCache *cache(QObject *obj) { Q_Q(QDeclarativeEngine); - if (!obj || QObjectPrivate::get(obj)->metaObject) return 0; + if (!obj || QObjectPrivate::get(obj)->metaObject || + QObjectPrivate::get(obj)->wasDeleted) return 0; const QMetaObject *mo = obj->metaObject(); QDeclarativePropertyCache *rv = propertyCache.value(mo); if (!rv) { @@ -318,7 +319,6 @@ public: static QScriptValue tint(QScriptContext*, QScriptEngine*); static QScriptValue closestAngle(QScriptContext*, QScriptEngine*); - static QScriptValue playSound(QScriptContext*, QScriptEngine*); static QScriptValue desktopOpenUrl(QScriptContext*, QScriptEngine*); static QScriptValue md5(QScriptContext*, QScriptEngine*); static QScriptValue btoa(QScriptContext*, QScriptEngine*); @@ -326,6 +326,10 @@ public: static QScriptValue consoleLog(QScriptContext*, QScriptEngine*); static QScriptValue quit(QScriptContext*, QScriptEngine*); + static QScriptValue formatDate(QScriptContext*, QScriptEngine*); + static QScriptValue formatTime(QScriptContext*, QScriptEngine*); + static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*); + static QScriptEngine *getScriptEngine(QDeclarativeEngine *e) { return &e->d_func()->scriptEngine; } static QDeclarativeEngine *getEngine(QScriptEngine *e) { return static_cast<QDeclarativeScriptEngine*>(e)->p->q_func(); } static QDeclarativeEnginePrivate *get(QDeclarativeEngine *e) { return e->d_func(); } diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 09882cb..3e4acbe 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -117,7 +117,7 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) QVariant value = prop.read(obj); rv.value = valueContents(value); - if (QVariant::Type(prop.userType()) < QVariant::UserType) { + if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { rv.type = QDeclarativeObjectProperty::Basic; } else if (QDeclarativeMetaType::isQObject(prop.userType())) { rv.type = QDeclarativeObjectProperty::Object; @@ -131,7 +131,7 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) const { int userType = value.userType(); - if (QVariant::Type(userType) < QVariant::UserType) + if (QDeclarativeValueTypeFactory::isValueType(userType)) return value; /* diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp index ae1e790..e528e9e 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/declarative/qml/qdeclarativeexpression.cpp @@ -46,6 +46,7 @@ #include "qdeclarativecontext_p.h" #include "qdeclarativerewrite_p.h" #include "qdeclarativecompiler_p.h" +#include "qdeclarativeglobalscriptclass_p.h" #include <QtCore/qdebug.h> #include <QtScript/qscriptprogram.h> @@ -135,6 +136,7 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContext *ctxt, void *expr, if (!dd->cachedClosures.at(progIdx)) { QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); scriptContext->pushScope(ep->contextClass->newSharedContext()); + scriptContext->pushScope(ep->globalClass->globalObject()); dd->cachedClosures[progIdx] = new QScriptValue(scriptEngine->evaluate(data->expression, data->url, data->line)); scriptEngine->popContext(); } @@ -151,9 +153,11 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContext *ctxt, void *expr, new QScriptProgram(data->expression, data->url, data->line); } - data->expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx)); + data->expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx), + &data->expressionContext); #else - data->expressionFunction = evalInObjectScope(ctxt, me, data->expression); + data->expressionFunction = evalInObjectScope(ctxt, me, data->expression, + &data->expressionContext); #endif data->expressionFunctionValid = true; @@ -164,22 +168,34 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContext *ctxt, void *expr, } QScriptValue QDeclarativeExpressionPrivate::evalInObjectScope(QDeclarativeContext *context, QObject *object, - const QString &program) + const QString &program, QScriptValue *contextObject) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine()); QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(&ep->scriptEngine); - scriptContext->pushScope(ep->contextClass->newContext(context, object)); + if (contextObject) { + *contextObject = ep->contextClass->newContext(context, object); + scriptContext->pushScope(*contextObject); + } else { + scriptContext->pushScope(ep->contextClass->newContext(context, object)); + } + scriptContext->pushScope(ep->globalClass->globalObject()); QScriptValue rv = ep->scriptEngine.evaluate(program); ep->scriptEngine.popContext(); return rv; } QScriptValue QDeclarativeExpressionPrivate::evalInObjectScope(QDeclarativeContext *context, QObject *object, - const QScriptProgram &program) + const QScriptProgram &program, QScriptValue *contextObject) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine()); QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(&ep->scriptEngine); - scriptContext->pushScope(ep->contextClass->newContext(context, object)); + if (contextObject) { + *contextObject = ep->contextClass->newContext(context, object); + scriptContext->pushScope(*contextObject); + } else { + scriptContext->pushScope(ep->contextClass->newContext(context, object)); + } + scriptContext->pushScope(ep->globalClass->globalObject()); QScriptValue rv = ep->scriptEngine.evaluate(program); ep->scriptEngine.popContext(); return rv; @@ -326,15 +342,14 @@ QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bo QDeclarativeEngine *engine = data->context()->engine(); QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); - if (secondaryScope) - ctxtPriv->defaultObjects.append(secondaryScope); - QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine); if (!data->expressionFunctionValid) { QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); - scriptContext->pushScope(ep->contextClass->newContext(data->context(), data->me)); + data->expressionContext = ep->contextClass->newContext(data->context(), data->me); + scriptContext->pushScope(data->expressionContext); + scriptContext->pushScope(ep->globalClass->globalObject()); if (data->expressionRewritten) { data->expressionFunction = scriptEngine->evaluate(data->expression, @@ -357,11 +372,14 @@ QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bo QDeclarativeContext *oldSharedContext = 0; QObject *oldSharedScope = 0; + QObject *oldOverride = 0; if (data->isShared) { oldSharedContext = ep->sharedContext; oldSharedScope = ep->sharedScope; ep->sharedContext = data->context(); ep->sharedScope = data->me; + } else { + oldOverride = ep->contextClass->setOverrideObject(data->expressionContext, secondaryScope); } QScriptValue svalue = data->expressionFunction.call(); @@ -369,6 +387,8 @@ QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bo if (data->isShared) { ep->sharedContext = oldSharedContext; ep->sharedScope = oldSharedScope; + } else { + ep->contextClass->setOverrideObject(data->expressionContext, oldOverride); } if (isUndefined) @@ -383,12 +403,6 @@ QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bo data->error = QDeclarativeError(); } - if (secondaryScope) { - QObject *last = ctxtPriv->defaultObjects.takeLast(); - Q_ASSERT(last == secondaryScope); - Q_UNUSED(last); - } - QVariant rv; if (svalue.isArray()) { diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h index 91ac4c0..cd1729d 100644 --- a/src/declarative/qml/qdeclarativeexpression_p.h +++ b/src/declarative/qml/qdeclarativeexpression_p.h @@ -119,6 +119,7 @@ public: bool expressionFunctionValid:1; bool expressionRewritten:1; QScriptValue expressionFunction; + QScriptValue expressionContext; QObject *me; bool trackChange; @@ -180,8 +181,8 @@ public: virtual void emitValueChanged(); static void exceptionToError(QScriptEngine *, QDeclarativeError &); - static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QString &); - static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QScriptProgram &); + static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QString &, QScriptValue * = 0); + static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QScriptProgram &, QScriptValue * = 0); }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass.cpp b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp index 5b06b42..9ee2fe5 100644 --- a/src/declarative/qml/qdeclarativeglobalscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp @@ -53,15 +53,17 @@ QT_BEGIN_NAMESPACE QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(QScriptEngine *engine) : QScriptClass(engine) { - QScriptValue v = engine->newObject(); - globalObject = engine->globalObject(); + QScriptValue globalObject = engine->globalObject(); + m_globalObject = engine->newObject(); QScriptValueIterator iter(globalObject); while (iter.hasNext()) { iter.next(); - v.setProperty(iter.scriptName(), iter.value()); + m_globalObject.setProperty(iter.scriptName(), iter.value()); + m_illegalNames.insert(iter.name()); } + QScriptValue v = engine->newObject(); v.setScriptClass(this); engine->setGlobalObject(v); } @@ -101,12 +103,14 @@ void QDeclarativeGlobalScriptClass::setProperty(QScriptValue &object, engine()->currentContext()->throwError(error); } +/* This method is for the use of tst_qdeclarativeecmascript::callQtInvokables() only */ void QDeclarativeGlobalScriptClass::explicitSetProperty(const QString &name, const QScriptValue &value) { + QScriptValue globalObject = engine()->globalObject(); + QScriptValue v = engine()->newObject(); - globalObject = engine()->globalObject(); - QScriptValueIterator iter(globalObject); + QScriptValueIterator iter(v); while (iter.hasNext()) { iter.next(); v.setProperty(iter.scriptName(), iter.value()); @@ -114,6 +118,7 @@ void QDeclarativeGlobalScriptClass::explicitSetProperty(const QString &name, con v.setProperty(name, value); v.setScriptClass(this); + engine()->setGlobalObject(v); } diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass_p.h b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h index a33cf5e..1b34aee 100644 --- a/src/declarative/qml/qdeclarativeglobalscriptclass_p.h +++ b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h @@ -54,6 +54,7 @@ // #include <QtScript/qscriptclass.h> +#include <QtCore/qset.h> QT_BEGIN_NAMESPACE @@ -74,8 +75,12 @@ public: void explicitSetProperty(const QString &, const QScriptValue &); + const QScriptValue &globalObject() const { return m_globalObject; } + const QSet<QString> &illegalNames() const { return m_illegalNames; } + private: - QScriptValue globalObject; + QSet<QString> m_illegalNames; + QScriptValue m_globalObject; }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h index d8af6a7..c41b14f 100644 --- a/src/declarative/qml/qdeclarativeinstruction_p.h +++ b/src/declarative/qml/qdeclarativeinstruction_p.h @@ -293,6 +293,7 @@ public: struct { int signalIndex; int value; + int context; } storeSignal; struct { int signal; 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<typename T> struct QDeclarativeListProperty { typedef void (*AppendFunction)(QDeclarativeListProperty<T> *, T*); diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 542f417..2e4ffa7 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -232,7 +232,7 @@ QDeclarativeObjectScriptClass::property(QObject *obj, const Identifier &name) QDeclarativeEnginePrivate::CapturedProperty(obj, lastData->coreIndex, lastData->notifyIndex); } - if ((uint)lastData->propType < QVariant::UserType) { + if (QDeclarativeValueTypeFactory::isValueType((uint)lastData->propType)) { QDeclarativeValueType *valueType = enginePriv->valueTypes[lastData->propType]; if (valueType) return Value(scriptEngine, enginePriv->valueTypeClass->newObject(obj, lastData->coreIndex, valueType)); diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp index 5ac49d5..b0599ad 100644 --- a/src/declarative/qml/qdeclarativeparser.cpp +++ b/src/declarative/qml/qdeclarativeparser.cpp @@ -221,12 +221,14 @@ QDeclarativeParser::Property::~Property() { foreach(Value *value, values) value->release(); + foreach(Value *value, onValues) + value->release(); if (value) value->release(); } -Object *QDeclarativeParser::Property::getValue() +Object *QDeclarativeParser::Property::getValue(const LocationSpan &l) { - if (!value) value = new Object; + if (!value) { value = new Object; value->location = l; } return value; } @@ -235,9 +237,14 @@ void QDeclarativeParser::Property::addValue(Value *v) values << v; } +void QDeclarativeParser::Property::addOnValue(Value *v) +{ + onValues << v; +} + bool QDeclarativeParser::Property::isEmpty() const { - return !value && values.isEmpty(); + return !value && values.isEmpty() && onValues.isEmpty(); } QDeclarativeParser::Value::Value() diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h index aae507e..5bf4b68 100644 --- a/src/declarative/qml/qdeclarativeparser_p.h +++ b/src/declarative/qml/qdeclarativeparser_p.h @@ -104,6 +104,11 @@ namespace QDeclarativeParser Location start; Location end; LocationRange range; + + bool operator<(LocationSpan &o) const { + return (start.line < o.start.line) || + (start.line == o.start.line && start.column < o.start.column); + } }; class Property; @@ -318,8 +323,9 @@ namespace QDeclarativeParser // The Object to which this property is attached Object *parent; - Object *getValue(); + Object *getValue(const LocationSpan &); void addValue(Value *v); + void addOnValue(Value *v); // The QVariant::Type of the property, or 0 (QVariant::Invalid) if // unknown. @@ -333,6 +339,8 @@ namespace QDeclarativeParser // The list of values assigned to this property. Content in values // and value are mutually exclusive QList<Value *> values; + // The list of values assigned to this property using the "on" syntax + QList<Value *> onValues; // The accessed property. This is used to represent dot properties. // Content in value and values are mutually exclusive. Object *value; diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index e1ec2cd..4f73b89 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -238,10 +238,10 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name if (property->flags & QDeclarativePropertyCache::Data::IsFunction) return; // Not an object property - if (ii == (path.count() - 2) && property->propType < (int)QVariant::UserType) { + if (ii == (path.count() - 2) && QDeclarativeValueTypeFactory::isValueType(property->propType)) { // We're now at a value type property. We can use a global valuetypes array as we // never actually use the objects, just look up their properties. - QObject *typeObject = qmlValueTypes()->valueTypes[property->propType]; + QObject *typeObject = (*qmlValueTypes())[property->propType]; if (!typeObject) return; // Not a value type int idx = typeObject->metaObject()->indexOfProperty(path.last().toUtf8().constData()); @@ -346,7 +346,7 @@ QDeclarativePropertyPrivate::propertyTypeCategory() const int type = propertyType(); if (type == QVariant::Invalid) return QDeclarativeProperty::InvalidCategory; - else if ((uint)type < QVariant::UserType) + else if (QDeclarativeValueTypeFactory::isValueType((uint)type)) return QDeclarativeProperty::Normal; else if (core.flags & QDeclarativePropertyCache::Data::IsQObjectDerived) return QDeclarativeProperty::Object; @@ -793,7 +793,7 @@ QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDecla QVariant QDeclarativePropertyPrivate::readValueProperty() { - if(isValueType()) { + if (isValueType()) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context); QDeclarativeValueType *valueType = 0; @@ -809,13 +809,20 @@ QVariant QDeclarativePropertyPrivate::readValueProperty() if (!ep) delete valueType; return rv; - } else if(core.flags & QDeclarativePropertyCache::Data::IsQList) { + } else if (core.flags & QDeclarativePropertyCache::Data::IsQList) { QDeclarativeListProperty<QObject> prop; void *args[] = { &prop, 0 }; QMetaObject::metacall(object, QMetaObject::ReadProperty, core.coreIndex, args); return QVariant::fromValue(QDeclarativeListReferencePrivate::init(prop, core.propType, engine)); + } else if (core.flags & QDeclarativePropertyCache::Data::IsQObjectDerived) { + + QObject *rv = 0; + void *args[] = { &rv, 0 }; + QMetaObject::metacall(object, QMetaObject::ReadProperty, core.coreIndex, args); + return QVariant::fromValue(rv); + } else { return object->metaObject()->property(core.coreIndex).read(object.data()); diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h index 1fda7f4..c31e2d3 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/declarative/qml/qdeclarativeproperty_p.h @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeContext; class QDeclarativeEnginePrivate; class QDeclarativeExpression; -class Q_AUTOTEST_EXPORT QDeclarativePropertyPrivate +class Q_DECLARATIVE_EXPORT QDeclarativePropertyPrivate { public: enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02 }; diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 08b47b7..fea59e5 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -155,9 +155,9 @@ QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObj int parenIdx = methodName.indexOf(QLatin1Char('(')); Q_ASSERT(parenIdx != -1); - methodName = methodName.left(parenIdx); + QStringRef methodNameRef = methodName.leftRef(parenIdx); - if (methodName == property) { + if (methodNameRef == property) { rv.load(m); return rv; } diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index f4c9cdd..fe516c5 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -85,8 +85,8 @@ class ProcessAST: protected AST::Visitor { const State &state = top(); if (state.property) { - State s(state.property->getValue(), - state.property->getValue()->getProperty(name.toUtf8())); + State s(state.property->getValue(location), + state.property->getValue(location)->getProperty(name.toUtf8())); s.property->location = location; push(s); } else { @@ -106,12 +106,12 @@ public: void operator()(const QString &code, AST::Node *node); protected: - Object *defineObjectBinding(AST::UiQualifiedId *propertyName, + Object *defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment, AST::UiQualifiedId *objectTypeName, LocationSpan location, AST::UiObjectInitializer *initializer = 0); - Object *defineObjectBinding_helper(AST::UiQualifiedId *propertyName, + Object *defineObjectBinding_helper(AST::UiQualifiedId *propertyName, bool onAssignment, const QString &objectType, AST::SourceLocation typeLocation, LocationSpan location, @@ -243,6 +243,7 @@ QString ProcessAST::asString(AST::UiQualifiedId *node) const Object * ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, + bool onAssignment, const QString &objectType, AST::SourceLocation typeLocation, LocationSpan location, @@ -254,10 +255,19 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, (lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper())); int propertyCount = 0; - for (; propertyName; propertyName = propertyName->next){ + for (AST::UiQualifiedId *name = propertyName; name; name = name->next){ ++propertyCount; - _stateStack.pushProperty(propertyName->name->asString(), - this->location(propertyName)); + _stateStack.pushProperty(name->name->asString(), + this->location(name)); + } + + if (!onAssignment && propertyCount && currentProperty() && currentProperty()->values.count()) { + QDeclarativeError error; + error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + error.setLine(this->location(propertyName).start.line); + error.setColumn(this->location(propertyName).start.column); + _parser->_errors << error; + return 0; } if (!isType) { @@ -327,7 +337,10 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, Value *v = new Value; v->object = obj; v->location = obj->location; - prop->addValue(v); + if (onAssignment) + prop->addOnValue(v); + else + prop->addValue(v); while (propertyCount--) _stateStack.pop(); @@ -363,7 +376,7 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, } } -Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId, +Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId, bool onAssignment, AST::UiQualifiedId *objectTypeName, LocationSpan location, AST::UiObjectInitializer *initializer) @@ -395,7 +408,7 @@ Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId, } - return defineObjectBinding_helper(qualifiedId, objectType, typeLocation, location, initializer); + return defineObjectBinding_helper(qualifiedId, onAssignment, objectType, typeLocation, location, initializer); } LocationSpan ProcessAST::location(AST::UiQualifiedId *id) @@ -623,7 +636,7 @@ bool ProcessAST::visit(AST::UiObjectDefinition *node) LocationSpan l = location(node->firstSourceLocation(), node->lastSourceLocation()); - defineObjectBinding(/*propertyName = */ 0, + defineObjectBinding(/*propertyName = */ 0, false, node->qualifiedTypeNameId, l, node->initializer); @@ -638,7 +651,7 @@ bool ProcessAST::visit(AST::UiObjectBinding *node) LocationSpan l = location(node->qualifiedTypeNameId->identifierToken, node->initializer->rbraceToken); - defineObjectBinding(node->qualifiedId, + defineObjectBinding(node->qualifiedId, node->hasOnToken, node->qualifiedTypeNameId, l, node->initializer); @@ -674,14 +687,23 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) { int propertyCount = 0; AST::UiQualifiedId *propertyName = node->qualifiedId; - for (; propertyName; propertyName = propertyName->next){ + for (AST::UiQualifiedId *name = propertyName; name; name = name->next){ ++propertyCount; - _stateStack.pushProperty(propertyName->name->asString(), - location(propertyName)); + _stateStack.pushProperty(name->name->asString(), + location(name)); } Property *prop = currentProperty(); + if (prop->values.count()) { + QDeclarativeError error; + error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + error.setLine(this->location(propertyName).start.line); + error.setColumn(this->location(propertyName).start.column); + _parser->_errors << error; + return 0; + } + QDeclarativeParser::Variant primitive; if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(node->statement)) { @@ -724,16 +746,26 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) { int propertyCount = 0; AST::UiQualifiedId *propertyName = node->qualifiedId; - for (; propertyName; propertyName = propertyName->next){ + for (AST::UiQualifiedId *name = propertyName; name; name = name->next){ ++propertyCount; - _stateStack.pushProperty(propertyName->name->asString(), - location(propertyName)); + _stateStack.pushProperty(name->name->asString(), + location(name)); + } + + Property* prop = currentProperty(); + + if (prop->values.count()) { + QDeclarativeError error; + error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times")); + error.setLine(this->location(propertyName).start.line); + error.setColumn(this->location(propertyName).start.column); + _parser->_errors << error; + return 0; } accept(node->members); // For the DOM, store the position of the T_LBRACKET upto the T_RBRACKET as the range: - Property* prop = currentProperty(); prop->listValueRange.offset = node->lbracketToken.offset; prop->listValueRange.length = node->rbracketToken.offset + node->rbracketToken.length - node->lbracketToken.offset; diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 01fa214..34d3795 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -45,19 +45,50 @@ QT_BEGIN_NAMESPACE +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) +Q_DECLARE_METATYPE(QEasingCurve); +#endif + QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory() { // ### Optimize for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) valueTypes[ii] = valueType(ii); +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + easingType = qMetaTypeId<QEasingCurve>(); + easingValueType = valueType(easingType); +#endif } QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory() { for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) delete valueTypes[ii]; +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + delete easingValueType; +#endif +} + +bool QDeclarativeValueTypeFactory::isValueType(int idx) +{ + if ((uint)idx < QVariant::UserType) + return true; +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + if (idx == qMetaTypeId<QEasingCurve>()) + return true; +#endif + return false; } +QDeclarativeValueType *QDeclarativeValueTypeFactory::operator[](int idx) const +{ +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + if (idx == easingType) return easingValueType; +#endif + return valueTypes[idx]; +} + + QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) { switch (t) { @@ -75,11 +106,17 @@ QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) return new QDeclarativeRectFValueType; case QVariant::Vector3D: return new QDeclarativeVector3DValueType; +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) case QVariant::EasingCurve: return new QDeclarativeEasingValueType; +#endif case QVariant::Font: return new QDeclarativeFontValueType; default: +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + if (t == qMetaTypeId<QEasingCurve>()) + return new QDeclarativeEasingValueType; +#endif return 0; } } @@ -495,7 +532,11 @@ void QDeclarativeEasingValueType::write(QObject *obj, int idx, QDeclarativePrope QVariant QDeclarativeEasingValueType::value() { +#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) return QVariant(easing); +#else + return QVariant::fromValue<QEasingCurve>(easing); +#endif } void QDeclarativeEasingValueType::setValue(QVariant value) diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index cb153be..e69f161 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -81,10 +81,17 @@ class Q_DECLARATIVE_EXPORT QDeclarativeValueTypeFactory public: QDeclarativeValueTypeFactory(); ~QDeclarativeValueTypeFactory(); + static bool isValueType(int); static QDeclarativeValueType *valueType(int); + QDeclarativeValueType *operator[](int idx) const; + +private: QDeclarativeValueType *valueTypes[QVariant::UserType - 1]; - QDeclarativeValueType *operator[](int idx) const { return valueTypes[idx]; } +#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) + int easingType; + QDeclarativeValueType *easingValueType; +#endif }; class Q_AUTOTEST_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index fc3722d..6a08674 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -538,13 +538,13 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack, QDeclarati case QDeclarativeInstruction::StoreSignal: { QObject *target = stack.top(); - // XXX scope - QMetaMethod signal = - target->metaObject()->method(instr.storeSignal.signalIndex); + QObject *context = stack.at(stack.count() - 1 - instr.assignBinding.context); + + QMetaMethod signal = target->metaObject()->method(instr.storeSignal.signalIndex); QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target); QDeclarativeExpression *expr = - new QDeclarativeExpression(ctxt, primitives.at(instr.storeSignal.value), target); + new QDeclarativeExpression(ctxt, primitives.at(instr.storeSignal.value), context); expr->setSourceLocation(comp->name, instr.line); bs->setExpression(expr); } diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index 03151e4..784353a 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -365,6 +365,8 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) workerEngine->evaluate(script); workerEngine->popContext(); + } else { + qWarning().nospace() << "WorkerScript: Cannot find source file " << url.toString(); } } @@ -382,7 +384,7 @@ QVariant QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(const QScri quint32 length = (quint32)value.property(QLatin1String("length")).toNumber(); for (quint32 ii = 0; ii < length; ++ii) { - QVariant v = scriptValueToVariant(ii); + QVariant v = scriptValueToVariant(value.property(ii)); list << v; } @@ -561,6 +563,65 @@ void QDeclarativeWorkerScriptEngine::run() delete d->workerEngine; d->workerEngine = 0; } + +/*! + \qmlclass WorkerScript QDeclarativeWorkerScript + \brief The WorkerScript element enables the use of threads in QML. + + Use WorkerScript to run operations in a new thread. + This is useful for running operations in the background so + that the main GUI thread is not blocked. + + Messages can be passed between the new thread and the parent thread + using sendMessage() and the onMessage() handler. + + Here is an example: + + \qml + import Qt 4.6 + + Rectangle { + width: 300 + height: 300 + + Text { + id: myText + text: 'Click anywhere' + } + + WorkerScript { + id: myWorker + source: "script.js" + + onMessage: { + myText.text = messageObject.reply + } + } + + MouseArea { + anchors.fill: parent + onClicked: myWorker.sendMessage( {'x': mouse.x, 'y': mouse.y} ); + } + } + \endqml + + The above worker script specifies a javascript file, "script.js", that handles + the operations to be performed in the new thread: + + \qml + WorkerScript.onMessage = function(message) { + // ... long-running operations and calculations are done here + WorkerScript.sendMessage( {'reply': 'Mouse is at ' + message.x + ',' + message.y} ); + } + \endqml + + When the user clicks anywhere within the rectangle, \c sendMessage() is + called, triggering the \tt WorkerScript.onMessage() handler in + \tt source.js. This in turn sends a reply message that is then received + by the \tt onMessage() handler of \tt myWorker. + + \sa WorkerListModel +*/ QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent) : QObject(parent), m_engine(0), m_scriptId(-1) { @@ -571,6 +632,12 @@ QDeclarativeWorkerScript::~QDeclarativeWorkerScript() if (m_scriptId != -1) m_engine->removeWorkerScript(m_scriptId); } +/*! + \qmlproperty url WorkerScript::source + + This holds the url of the javascript file that implements the + \tt WorkerScript.onMessage() handler for threaded operations. +*/ QUrl QDeclarativeWorkerScript::source() const { return m_source; @@ -589,6 +656,13 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source) emit sourceChanged(); } +/* + \qmlmethod WorkerScript::sendMessage(jsobject message) + + Sends the given \a message to a worker script handler in another + thread. The other worker script handler can receive this message + through the onMessage() handler. +*/ void QDeclarativeWorkerScript::sendMessage(const QScriptValue &message) { if (!m_engine) { @@ -616,6 +690,13 @@ void QDeclarativeWorkerScript::componentComplete() } } +/*! + \qmlsignal WorkerScript::onMessage(jsobject msg) + + This handler is called when a message \a msg is received from a worker + script in another thread through a call to sendMessage(). +*/ + bool QDeclarativeWorkerScript::event(QEvent *event) { if (event->type() == (QEvent::Type)WorkerDataEvent::WorkerData) { @@ -841,6 +922,41 @@ bool QDeclarativeWorkerListModelAgent::event(QEvent *e) return QObject::event(e); } +/*! + \qmlclass WorkerListModel QDeclarativeWorkerListModel + \brief The WorkerListModel element provides a threaded list model. + + Use WorkerListModel together with WorkerScript to define a list model + that is controlled by a separate thread. This is useful if list modification + operations are synchronous and take some time: using WorkerListModel + moves these operations to a different thread and avoids blocking of the + main GUI thread. + + The thread that creates the WorkerListModel can modify the model for any + initial set-up requirements. However, once the model has been modified by + the associated WorkerScript, the model can only be modified by that worker + script and becomes read-only to all other threads. + + Here is an example application that uses WorkerScript to append the + current time to a WorkerListModel: + + \snippet examples/declarative/workerlistmodel/timedisplay.qml 0 + + The included file, \tt dataloader.js, looks like this: + + \snippet examples/declarative/workerlistmodel/dataloader.js 0 + + The application's \tt Timer object periodically sends a message to the + worker script by calling \tt WorkerScript::sendMessage(). When this message + is received, \tt WorkerScript.onMessage() is invoked in + \tt dataloader.js, which appends the current time to the worker list + model. + + Note that unlike ListModel, WorkerListModel does not have \tt move() and + \tt setProperty() methods. + + \sa WorkerScript, ListModel +*/ QDeclarativeWorkerListModel::QDeclarativeWorkerListModel(QObject *parent) : QListModelInterface(parent), m_agent(0) { @@ -854,6 +970,14 @@ QDeclarativeWorkerListModel::~QDeclarativeWorkerListModel() } } +/*! + \qmlmethod WorkerListModel::clear() + + Deletes all content from the model. The properties are cleared such that + different properties may be set on subsequent additions. + + \sa append() remove() +*/ void QDeclarativeWorkerListModel::clear() { if (m_agent) { @@ -869,6 +993,13 @@ void QDeclarativeWorkerListModel::clear() } } +/*! + \qmlmethod WorkerListModel::remove(int index) + + Deletes the content at \a index from the model. + + \sa clear() +*/ void QDeclarativeWorkerListModel::remove(int index) { if (m_agent) { @@ -884,6 +1015,18 @@ void QDeclarativeWorkerListModel::remove(int index) emit countChanged(); } +/*! + \qmlmethod WorkerListModel::append(jsobject dict) + + Adds a new item to the end of the list model, with the + values in \a dict. + + \code + FruitModel.append({"cost": 5.95, "name":"Pizza"}) + \endcode + + \sa set() remove() +*/ void QDeclarativeWorkerListModel::append(const QScriptValue &value) { if (m_agent) { @@ -914,6 +1057,21 @@ void QDeclarativeWorkerListModel::append(const QScriptValue &value) emit countChanged(); } +/*! + \qmlmethod WorkerListModel::insert(int index, jsobject dict) + + Adds a new item to the list model at position \a index, with the + values in \a dict. + + \code + FruitModel.insert(2, {"cost": 5.95, "name":"Pizza"}) + \endcode + + The \a index must be to an existing item in the list, or one past + the end of the list (equivalent to append). + + \sa set() append() +*/ void QDeclarativeWorkerListModel::insert(int index, const QScriptValue &value) { if (m_agent) { @@ -946,6 +1104,30 @@ void QDeclarativeWorkerListModel::insert(int index, const QScriptValue &value) emit countChanged(); } +/*! + \qmlmethod object ListModel::get(int index) + + Returns the item at \a index in the list model. + + \code + FruitModel.append({"cost": 5.95, "name":"Jackfruit"}) + FruitModel.get(0).cost + \endcode + + The \a index must be an element in the list. + + Note that properties of the returned object that are themselves objects + will also be models, and this get() method is used to access elements: + + \code + FruitModel.append(..., "attributes": + [{"name":"spikes","value":"7mm"}, + {"name":"color","value":"green"}]); + FruitModel.get(0).attributes.get(1).value; // == "green" + \endcode + + \sa append() +*/ QScriptValue QDeclarativeWorkerListModel::get(int index) const { QDeclarativeEngine *engine = qmlEngine(this); @@ -962,6 +1144,21 @@ QScriptValue QDeclarativeWorkerListModel::get(int index) const return rv; } +/*! + \qmlmethod WorkerListModel::set(int index, jsobject dict) + + Changes the item at \a index in the list model with the + values in \a dict. Properties not appearing in \a valuemap + are left unchanged. + + \code + FruitModel.set(3, {"cost": 5.95, "name":"Pizza"}) + \endcode + + The \a index must be an element in the list. + + \sa append() +*/ void QDeclarativeWorkerListModel::set(int index, const QScriptValue &value) { if (m_agent) { @@ -995,6 +1192,22 @@ void QDeclarativeWorkerListModel::set(int index, const QScriptValue &value) } } +/*! + \qmlmethod WorkerListModel::sync() + + Writes any unsaved changes to the list model. This must be called after + changes have been made to the list model in the worker script. + + Note that this method can only be called from the associated worker script. +*/ +void QDeclarativeWorkerListModel::sync() +{ + // This is really a dummy method to make it look like sync() exists in + // WorkerListModel (and not QDeclarativeWorkerListModelAgent) and to let + // us document sync(). + qmlInfo(this) << "sync() can only be called from a WorkerScript"; +} + QDeclarativeWorkerListModelAgent *QDeclarativeWorkerListModel::agent() { if (!m_agent) @@ -1013,6 +1226,10 @@ QString QDeclarativeWorkerListModel::toString(int role) const return m_roles.value(role); } +/*! + \qmlproperty int ListModel::count + The number of data entries in the model. +*/ int QDeclarativeWorkerListModel::count() const { return m_values.count(); @@ -1038,4 +1255,3 @@ QT_END_NAMESPACE #include "qdeclarativeworkerscript.moc" - diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h index 8ebd2c1..912eac9 100644 --- a/src/declarative/qml/qdeclarativeworkerscript_p.h +++ b/src/declarative/qml/qdeclarativeworkerscript_p.h @@ -61,8 +61,12 @@ #include <QtScript/qscriptvalue.h> #include <QtCore/qurl.h> +QT_BEGIN_HEADER + QT_BEGIN_NAMESPACE +QT_MODULE(Declarative) + class QDeclarativeWorkerScript; class QDeclarativeWorkerScriptEnginePrivate; class QDeclarativeWorkerScriptEngine : public QThread @@ -84,7 +88,7 @@ private: QDeclarativeWorkerScriptEnginePrivate *d; }; -class QDeclarativeWorkerScript : public QObject, public QDeclarativeParserStatus +class Q_DECLARATIVE_EXPORT QDeclarativeWorkerScript : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -115,7 +119,7 @@ private: }; class QDeclarativeWorkerListModelAgent; -class QDeclarativeWorkerListModel : public QListModelInterface +class Q_DECLARATIVE_EXPORT QDeclarativeWorkerListModel : public QListModelInterface { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) @@ -130,6 +134,7 @@ public: Q_INVOKABLE void insert(int index, const QScriptValue&); Q_INVOKABLE QScriptValue get(int index) const; Q_INVOKABLE void set(int index, const QScriptValue &); + Q_INVOKABLE void sync(); QDeclarativeWorkerListModelAgent *agent(); @@ -157,4 +162,6 @@ QT_END_NAMESPACE QML_DECLARE_TYPE(QDeclarativeWorkerScript); QML_DECLARE_TYPE(QDeclarativeWorkerListModel); +QT_END_HEADER + #endif // QDECLARATIVEWORKERSCRIPT_P_H diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 10230d3..76b6a58 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -52,6 +52,7 @@ #include <qdeclarativestringconverters_p.h> #include <qdeclarativeglobal_p.h> #include <qdeclarativemetatype_p.h> +#include <qdeclarativevaluetype_p.h> #include <qdeclarativeproperty_p.h> #include <qvariant.h> @@ -110,7 +111,7 @@ QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QDeclarativeAbstrac \code Rectangle { width: 100; height: 100 - x: NumberAnimation { + NumberAnimation on x { running: myMouse.pressed from: 0; to: 100 } @@ -310,7 +311,7 @@ void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f) \code Rectangle { - rotation: NumberAnimation { running: true; repeat: true; from: 0 to: 360 } + NumberAnimation on rotation { running: true; repeat: true; from: 0 to: 360 } } \endcode */ @@ -412,7 +413,7 @@ void QDeclarativeAbstractAnimation::resume() no further influence on property values. In this example animation \code Rectangle { - x: NumberAnimation { from: 0; to: 100; duration: 500 } + NumberAnimation on x { from: 0; to: 100; duration: 500 } } \endcode was stopped at time 250ms, the \c x property will have a value of 50. @@ -450,7 +451,7 @@ void QDeclarativeAbstractAnimation::restart() its end. In the following example, \code Rectangle { - x: NumberAnimation { from: 0; to: 100; duration: 500 } + NumberAnimation on x { from: 0; to: 100; duration: 500 } } \endcode calling \c stop() at time 250ms will result in the \c x property having @@ -1292,7 +1293,7 @@ QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent) Q_D(QDeclarativePropertyAnimation); d->interpolatorType = QMetaType::QVector3D; d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); - d->defaultToInterpolatorType = true; + d->defaultToInterpolatorType = true; } QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation() @@ -1573,7 +1574,8 @@ QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent QDeclarativeAnimationGroup(parent) { Q_D(QDeclarativeAnimationGroup); - d->ag = new QSequentialAnimationGroup(this); + d->ag = new QSequentialAnimationGroup; + QDeclarative_setParent_noEvent(d->ag, this); } QDeclarativeSequentialAnimation::~QDeclarativeSequentialAnimation() @@ -1638,7 +1640,8 @@ QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) : QDeclarativeAnimationGroup(parent) { Q_D(QDeclarativeAnimationGroup); - d->ag = new QParallelAnimationGroup(this); + d->ag = new QParallelAnimationGroup; + QDeclarative_setParent_noEvent(d->ag, this); } QDeclarativeParallelAnimation::~QDeclarativeParallelAnimation() @@ -1708,12 +1711,13 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int break; } default: - if ((uint)type >= QVariant::UserType) { + if (QDeclarativeValueTypeFactory::isValueType((uint)type)) { + variant.convert((QVariant::Type)type); + } else { QDeclarativeMetaType::StringConverter converter = QDeclarativeMetaType::customStringConverter(type); if (converter) variant = converter(variant.toString()); - } else - variant.convert((QVariant::Type)type); + } break; } } @@ -1732,14 +1736,14 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int Animate any objects that have changed their x or y properties in the target state using an InOutQuad easing curve: \qml - Transition { PropertyAnimation { properties: "x,y"; easing: "InOutQuad" } } + Transition { PropertyAnimation { properties: "x,y"; easing.type: "InOutQuad" } } \endqml \o In a Behavior Animate all changes to a rectangle's x property. \qml Rectangle { - x: Behavior { PropertyAnimation {} } + Behavior on x { PropertyAnimation {} } } \endqml \o As a property value source @@ -1747,7 +1751,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int Repeatedly animate the rectangle's x property. \qml Rectangle { - x: SequentialAnimation { + SequentialAnimation on x { repeat: true PropertyAnimation { to: 50 } PropertyAnimation { to: 0 } @@ -1797,7 +1801,7 @@ QDeclarativePropertyAnimation::~QDeclarativePropertyAnimation() void QDeclarativePropertyAnimationPrivate::init() { Q_Q(QDeclarativePropertyAnimation); - va = new QDeclarativeTimeLineValueAnimator; + va = new QDeclarativeBulkValueAnimator; QDeclarative_setParent_noEvent(va, q); } @@ -1873,7 +1877,13 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) \qmlproperty QEasingCurve PropertyAnimation::easing \brief the easing curve used for the transition. - Available values are: + For the easing you can specify the following parameters: type, amplitude, period and overshoot. + + \qml + PropertyAnimation { properties: "y"; easing.type: "InOutElastc"; easing.amplitude: 2.0; easing.period: 1.5 } + \endqml + + Available types are: \table \row @@ -2044,6 +2054,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) \o \inlineimage qeasingcurve-outinbounce.png \endtable + easing.amplitude is not applicable for all curve types. It is only applicable for bounce and elastic curves (curves of type + QEasingCurve::InBounce, QEasingCurve::OutBounce, QEasingCurve::InOutBounce, QEasingCurve::OutInBounce, QEasingCurve::InElastic, + QEasingCurve::OutElastic, QEasingCurve::InOutElastic or QEasingCurve::OutInElastic). + + easing.overshoot is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InBack, QEasingCurve::OutBack, + QEasingCurve::InOutBack or QEasingCurve::OutInBack. + + easing.period is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InElastic, QEasingCurve::OutElastic, + QEasingCurve::InOutElastic or QEasingCurve::OutInElastic. */ QEasingCurve QDeclarativePropertyAnimation::easing() const { @@ -2138,8 +2157,8 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) id: theRect width: 100; height: 100 color: Qt.rgba(0,0,1) - x: NumberAnimation { to: 500; repeat: true } //animate theRect's x property - y: Behavior { NumberAnimation {} } //animate theRect's y property + NumberAnimation on x { to: 500; repeat: true } //animate theRect's x property + Behavior on y { NumberAnimation {} } //animate theRect's y property } \endqml \row @@ -2213,7 +2232,7 @@ QAbstractAnimation *QDeclarativePropertyAnimation::qtAnimation() return d->va; } -struct PropertyUpdater : public QDeclarativeTimeLineValue +struct PropertyUpdater : public QDeclarativeBulkValueUpdater { QDeclarativeStateActions actions; int interpolatorType; //for Number/ColorAnimation @@ -2223,7 +2242,7 @@ struct PropertyUpdater : public QDeclarativeTimeLineValue bool fromSourced; bool fromDefined; bool *wasDeleted; - PropertyUpdater() : wasDeleted(0) {} + PropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} ~PropertyUpdater() { if (wasDeleted) *wasDeleted = true; } void setValue(qreal v) { @@ -2231,7 +2250,6 @@ struct PropertyUpdater : public QDeclarativeTimeLineValue wasDeleted = &deleted; if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1 v = 1 - v; - QDeclarativeTimeLineValue::setValue(v); for (int ii = 0; ii < actions.count(); ++ii) { QDeclarativeAction &action = actions[ii]; diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h index e582066..ae82a90 100644 --- a/src/declarative/util/qdeclarativeanimation_p_p.h +++ b/src/declarative/util/qdeclarativeanimation_p_p.h @@ -149,14 +149,21 @@ private: bool running; }; -//animates QDeclarativeTimeLineValue (assumes start and end values will be reals or compatible) -class QDeclarativeTimeLineValueAnimator : public QVariantAnimation +class QDeclarativeBulkValueUpdater +{ +public: + virtual ~QDeclarativeBulkValueUpdater() {} + virtual void setValue(qreal value) = 0; +}; + +//animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible) +class QDeclarativeBulkValueAnimator : public QVariantAnimation { Q_OBJECT public: - QDeclarativeTimeLineValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {} - ~QDeclarativeTimeLineValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } } - void setAnimValue(QDeclarativeTimeLineValue *value, DeletionPolicy p) + QDeclarativeBulkValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {} + ~QDeclarativeBulkValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } } + void setAnimValue(QDeclarativeBulkValueUpdater *value, DeletionPolicy p) { if (state() == Running) stop(); @@ -193,7 +200,7 @@ protected: } private: - QDeclarativeTimeLineValue *animValue; + QDeclarativeBulkValueUpdater *animValue; bool *fromSourced; DeletionPolicy policy; }; @@ -352,7 +359,7 @@ public: int interpolatorType; QVariantAnimation::Interpolator interpolator; - QDeclarativeTimeLineValueAnimator *va; + QDeclarativeBulkValueAnimator *va; static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress); static void convertVariant(QVariant &variant, int type); diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index 5352341..dea2c02 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -75,13 +75,13 @@ public: Behaviors provide one way to specify \l{qdeclarativeanimation.html}{animations} in QML. - In the example below, the rect will use a bounce easing curve over 200 millisecond for any changes to its y property: + In the example below, the rectangle will use a bounce easing curve over 200 millisecond for any changes to its y property: \code Rectangle { width: 20; height: 20 color: "#00ff00" - y: 200 //initial value - y: Behavior { + y: 200 // initial value + Behavior on y { NumberAnimation { easing: "easeOutBounce(amplitude:100)" duration: 200 diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp index e95a03e..26baa38 100644 --- a/src/declarative/util/qdeclarativebind.cpp +++ b/src/declarative/util/qdeclarativebind.cpp @@ -72,7 +72,7 @@ public: /*! \qmlclass Binding QDeclarativeBind - \since 4.7 + \since 4.7 \brief The Binding element allows arbitrary property bindings to be created. Sometimes it is necessary to bind to a property of an object that wasn't @@ -114,6 +114,19 @@ QDeclarativeBind::~QDeclarativeBind() { } +/*! + \qmlproperty bool Binding::when + + This property holds when the binding is active. + This should be set to an expression that evaluates to true when you want the binding to be active. + + \code + Binding { + target: contactName; property: 'text' + value: name; when: list.ListView.isCurrentItem + } + \endcode +*/ bool QDeclarativeBind::when() const { Q_D(const QDeclarativeBind); diff --git a/src/declarative/util/qdeclarativeeasefollow.cpp b/src/declarative/util/qdeclarativeeasefollow.cpp index 3fa9866..ee181dd 100644 --- a/src/declarative/util/qdeclarativeeasefollow.cpp +++ b/src/declarative/util/qdeclarativeeasefollow.cpp @@ -59,10 +59,10 @@ class QDeclarativeEaseFollowPrivate : public QObjectPrivate public: QDeclarativeEaseFollowPrivate() : source(0), velocity(200), duration(-1), maximumEasingTime(-1), - reversingMode(QDeclarativeEaseFollow::Eased), initialVelocity(0), + reversingMode(QDeclarativeEaseFollow::Eased), initialVelocity(0), initialValue(0), invert(false), enabled(true), trackVelocity(0), clockOffset(0), lastTick(0), clock(this) - {} + {} qreal source; qreal velocity; @@ -173,7 +173,7 @@ bool QDeclarativeEaseFollowPrivate::recalc() } /* - qWarning() << "a:" << a << "tf:" << tf << "tp:" << tp << "vp:" + qWarning() << "a:" << a << "tf:" << tf << "tp:" << tp << "vp:" << vp << "sp:" << sp << "vi:" << vi << "invert:" << invert; */ return true; @@ -254,19 +254,19 @@ void QDeclarativeEaseFollowPrivate::tick(int t) \since 4.7 \brief The EaseFollow element allows a property to smoothly track a value. - The EaseFollow smoothly animates a property's value to a set target value + The EaseFollow smoothly animates a property's value to a set target value using an ease in/out quad easing curve. If the target value changes while - the animation is in progress, the easing curves used to animate to the old + the animation is in progress, the easing curves used to animate to the old and the new target values are spliced together to avoid any obvious visual glitches. The property animation is configured by setting the velocity at which the - animation should occur, or the duration that the animation should take. + animation should occur, or the duration that the animation should take. If both a velocity and a duration are specified, the one that results in the quickest animation is chosen for each change in the target value. For example, animating from 0 to 800 will take 4 seconds if a velocity - of 200 is set, will take 8 seconds with a duration of 8000 set, and will + of 200 is set, will take 8 seconds with a duration of 8000 set, and will take 4 seconds with both a velocity of 200 and a duration of 8000 set. Animating from 0 to 20000 will take 10 seconds if a velocity of 200 is set, will take 8 seconds with a duration of 8000 set, and will take 8 seconds @@ -283,8 +283,8 @@ Rectangle { color: "green" width: 60; height: 60; x: -5; y: -5; - x: EaseFollow { source: rect1.x - 5; velocity: 200 } - y: EaseFollow { source: rect1.y - 5; velocity: 200 } + EaseFollow on x { source: rect1.x - 5; velocity: 200 } + EaseFollow on y { source: rect1.y - 5; velocity: 200 } } Rectangle { @@ -338,8 +338,8 @@ qreal QDeclarativeEaseFollow::sourceValue() const Sets how the EaseFollow behaves if an animation direction is reversed. If reversing mode is \c Eased, the animation will smoothly decelerate, and - then reverse direction. If the reversing mode is \c Immediate, the - animation will immediately begin accelerating in the reverse direction, + then reverse direction. If the reversing mode is \c Immediate, the + animation will immediately begin accelerating in the reverse direction, begining with a velocity of 0. If the reversing mode is \c Sync, the property is immediately set to the target value. */ @@ -373,7 +373,7 @@ void QDeclarativeEaseFollowPrivate::restart() return; } - bool hasReversed = trackVelocity != 0. && + bool hasReversed = trackVelocity != 0. && ((trackVelocity > 0) == ((initialValue - source) > 0)); if (hasReversed) { @@ -440,7 +440,7 @@ void QDeclarativeEaseFollow::setDuration(qreal v) d->duration = v; d->trackVelocity = 0; - if (d->clock.state() == QAbstractAnimation::Running) + if (d->clock.state() == QAbstractAnimation::Running) d->restart(); emit durationChanged(); @@ -470,7 +470,7 @@ void QDeclarativeEaseFollow::setVelocity(qreal v) d->velocity = v; d->trackVelocity = 0; - if (d->clock.state() == QAbstractAnimation::Running) + if (d->clock.state() == QAbstractAnimation::Running) d->restart(); emit velocityChanged(); @@ -511,8 +511,8 @@ void QDeclarativeEaseFollow::setTarget(const QDeclarativeProperty &t) \qmlproperty qreal EaseFollow::maximumEasingTime This property specifies the maximum time an "eases" during the follow should take. -Setting this property causes the velocity to "level out" after at a time. Setting -a negative value reverts to the normal mode of easing over the entire animation +Setting this property causes the velocity to "level out" after at a time. Setting +a negative value reverts to the normal mode of easing over the entire animation duration. The default value is -1. @@ -528,7 +528,7 @@ void QDeclarativeEaseFollow::setMaximumEasingTime(qreal v) Q_D(QDeclarativeEaseFollow); d->maximumEasingTime = v; - if (d->clock.state() == QAbstractAnimation::Running) + if (d->clock.state() == QAbstractAnimation::Running) d->restart(); emit maximumEasingTimeChanged(); diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 4d12ae1..8f5f537 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -189,6 +189,16 @@ void QDeclarativeFontLoader::setName(const QString &name) \o Loading - the font is currently being loaded \o Error - an error occurred while loading the font \endlist + + Note that a change in the status property does not cause anything to happen + (although it reflects what has happened to the font loader internally). If you wish + to react to the change in status you need to do it yourself, for example in one + of the following ways: + \list + \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: loader.status = FontLoader.Ready;} + \o Do something inside the onStatusChanged signal handler, e.g. FontLoader{id: loader; onStatusChanged: if(loader.status == FontLoader.Ready) console.log('Loaded');} + \o Bind to the status variable somewhere, e.g. Text{text: if(loader.status!=FontLoader.Ready){'Not Loaded';}else{'Loaded';}} + \endlist */ QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const { diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp index 6205ab9..1d69dd3 100644 --- a/src/declarative/util/qdeclarativespringfollow.cpp +++ b/src/declarative/util/qdeclarativespringfollow.cpp @@ -222,8 +222,8 @@ void QDeclarativeSpringFollowPrivate::stop() id: rect1 width: 20; height: 20 color: "#00ff00" - y: 200 //initial value - y: SequentialAnimation { + y: 200 // initial value + SequentialAnimation on y { running: true repeat: true NumberAnimation { @@ -239,7 +239,7 @@ void QDeclarativeSpringFollowPrivate::stop() x: rect1.width width: 20; height: 20 color: "#ff0000" - y: SpringFollow { source: rect1.y; velocity: 200 } + SpringFollow on y { source: rect1.y; velocity: 200 } } \endcode 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; diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index 6fe5bf3..cd67aeb 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -51,6 +51,7 @@ #include <qdeclarativedebug_p.h> #include <qdeclarativedebugservice_p.h> #include <qdeclarativeglobal_p.h> +#include <qdeclarativeguard_p.h> #include <qscriptvalueiterator.h> #include <qdebug.h> @@ -136,8 +137,8 @@ public: QDeclarativeView *q; - QGuard<QGraphicsObject> root; - QGuard<QDeclarativeItem> qmlRoot; + QDeclarativeGuard<QGraphicsObject> root; + QDeclarativeGuard<QDeclarativeItem> qmlRoot; QUrl source; @@ -193,6 +194,7 @@ void QDeclarativeViewPrivate::execute() \o Initializes QGraphicsView for QML key handling: \list \o QGraphicsView::viewport()->setFocusPolicy(Qt::NoFocus); + \o QGraphicsView::setFocusPolicy(Qt::StrongFocus); \o QGraphicsScene::setStickyFocus(true); \endlist \endlist @@ -267,6 +269,7 @@ void QDeclarativeViewPrivate::init() q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); scene.setItemIndexMethod(QGraphicsScene::NoIndex); q->viewport()->setFocusPolicy(Qt::NoFocus); + q->setFocusPolicy(Qt::StrongFocus); scene.setStickyFocus(true); //### needed for correct focus handling } @@ -282,13 +285,14 @@ QDeclarativeView::~QDeclarativeView() /*! Sets the source to the \a url, loads the QML component and instantiates it. + + Calling this methods multiple times with the same url will result + in the QML being reloaded. */ void QDeclarativeView::setSource(const QUrl& url) { - if (url != d->source) { - d->source = url; - d->execute(); - } + d->source = url; + d->execute(); } /*! 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 <QtCore/qdatetime.h> +#include <QtCore/qurl.h> #include <QtGui/qgraphicssceneevent.h> #include <QtGui/qgraphicsview.h> #include <QtGui/qwidget.h> @@ -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); diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 162a669..d260ada 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -647,11 +647,21 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati This property holds the status of data source loading. It can be one of: \list \o Null - no data source has been set - \o Ready - nthe data source has been loaded + \o Ready - the data source has been loaded \o Loading - the data source is currently being loaded \o Error - an error occurred while loading the data source \endlist + Note that a change in the status property does not cause anything to happen + (although it reflects what has happened to the XmlListModel internally). If you wish + to react to the change in status you need to do it yourself, for example in one + of the following ways: + \list + \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: xmlListModel.status = XmlListModel.Ready;} + \o Do something inside the onStatusChanged signal handler, e.g. XmlListModel{id: xmlListModel; onStatusChanged: if(xmlListModel.status == XmlListModel.Ready) console.log('Loaded');} + \o Bind to the status variable somewhere, e.g. Text{text: if(xmlListModel.status!=XmlListModel.Ready){'Not Loaded';}else{'Loaded';}} + \endlist + \sa progress */ diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp index 4523433..25d9ebb 100644 --- a/src/gui/dialogs/qabstractprintdialog.cpp +++ b/src/gui/dialogs/qabstractprintdialog.cpp @@ -76,6 +76,7 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate \value AllPages All pages should be printed. \value Selection Only the selection should be printed. \value PageRange The specified page range should be printed. + \value CurrentPage Only the currently visible page should be printed. \sa QPrinter::PrintRange */ @@ -89,7 +90,9 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate \value PrintToFile The print to file option is enabled. \value PrintSelection The print selection option is enabled. \value PrintPageRange The page range selection option is enabled. - \value PrintCollateCopies + \value PrintShowPageSize Show the page size + margins page only if this is enabled. + \value PrintCollateCopies The collate copies option is enabled + \value PrintCurrentPage The print current page option is enabled This value is obsolete and does nothing since Qt 4.5: @@ -97,8 +100,6 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate would create a sheet by default the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use QPrintDialog::open() instead. - - \value PrintShowPageSize Show the page size + margins page only if this is enabled. */ /*! diff --git a/src/gui/dialogs/qabstractprintdialog.h b/src/gui/dialogs/qabstractprintdialog.h index 4d867f6..82e3df8 100644 --- a/src/gui/dialogs/qabstractprintdialog.h +++ b/src/gui/dialogs/qabstractprintdialog.h @@ -65,7 +65,8 @@ public: enum PrintRange { AllPages, Selection, - PageRange + PageRange, + CurrentPage }; enum PrintDialogOption { @@ -75,7 +76,8 @@ public: PrintPageRange = 0x0004, PrintShowPageSize = 0x0008, PrintCollateCopies = 0x0010, - DontUseSheet = 0x0020 + DontUseSheet = 0x0020, + PrintCurrentPage = 0x0040 }; Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption) 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; diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp index 1336c04..b071427 100644 --- a/src/gui/dialogs/qprintdialog_qws.cpp +++ b/src/gui/dialogs/qprintdialog_qws.cpp @@ -178,6 +178,10 @@ void QPrintDialogPrivate::_q_okClicked() q->setPrintRange(QPrintDialog::PageRange); q->setFromTo(firstPage->value(), lastPage->value()); break; + case (int)QPrintDialog::CurrentPage: + q->setPrintRange(QPrintDialog::CurrentPage); + q->setFromTo(0, 0); + break; } q->accept(); } @@ -375,6 +379,7 @@ void QPrintDialogPrivate::setupOptions() rangeCombo->addItem(QPrintDialog::tr("Print all"), QPrintDialog::AllPages); rangeCombo->addItem(QPrintDialog::tr("Print selection"), QPrintDialog::Selection); rangeCombo->addItem(QPrintDialog::tr("Print range"), QPrintDialog::PageRange); + rangeCombo->addItem(QPrintDialog::tr("Print current page"), QPrintDialog::CurrentPage); QObject::connect(rangeCombo, SIGNAL(activated(int)), q, SLOT(_q_printRangeSelected(int))); @@ -490,6 +495,9 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings) if (!q->isOptionEnabled(QPrintDialog::PrintPageRange) && rangeCombo->findData(QPrintDialog::PageRange) > 0) rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::PageRange)); + if (!q->isOptionEnabled(QPrintDialog::PrintCurrentPage) + && rangeCombo->findData(QPrintDialog::CurrentPage) > 0) + rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::CurrentPage)); switch (q->printRange()) { case QPrintDialog::AllPages: @@ -501,6 +509,9 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings) case QPrintDialog::PageRange: rangeCombo->setCurrentIndex((int)(QPrintDialog::PageRange)); break; + case QPrintDialog::CurrentPage: + rangeCombo->setCurrentIndex((int)(QPrintDialog::CurrentPage)); + break; } } diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 2d169cf..0487f23 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -502,6 +502,9 @@ void QPrintDialogPrivate::setupPrinter() } else if (options.printSelection->isChecked()) { p->setPrintRange(QPrinter::Selection); p->setFromTo(0,0); + } else if (options.printCurrentPage->isChecked()) { + p->setPrintRange(QPrinter::CurrentPage); + p->setFromTo(0,0); } else if (options.printRange->isChecked()) { p->setPrintRange(QPrinter::PageRange); p->setFromTo(options.from->value(), qMax(options.from->value(), options.to->value())); @@ -518,10 +521,12 @@ void QPrintDialogPrivate::updateWidgets() { Q_Q(QPrintDialog); options.gbPrintRange->setVisible(q->isOptionEnabled(QPrintDialog::PrintPageRange) || - q->isOptionEnabled(QPrintDialog::PrintSelection)); + q->isOptionEnabled(QPrintDialog::PrintSelection) || + q->isOptionEnabled(QPrintDialog::PrintCurrentPage)); options.printRange->setEnabled(q->isOptionEnabled(QPrintDialog::PrintPageRange)); options.printSelection->setVisible(q->isOptionEnabled(QPrintDialog::PrintSelection)); + options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage)); options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies)); switch (q->printRange()) { @@ -534,6 +539,10 @@ void QPrintDialogPrivate::updateWidgets() case QPrintDialog::PageRange: options.printRange->setChecked(true); break; + case QPrintDialog::CurrentPage: + if (q->isOptionEnabled(QPrintDialog::PrintCurrentPage)) + options.printCurrentPage->setChecked(true); + break; default: break; } diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp index fa0c99f..1061660 100644 --- a/src/gui/dialogs/qprintdialog_win.cpp +++ b/src/gui/dialogs/qprintdialog_win.cpp @@ -128,11 +128,14 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent, if (pd->nMinPage==0 && pd->nMaxPage==0) pd->Flags |= PD_NOPAGENUMS; - // we don't have a 'current page' notion in the QPrinter API yet. - // Neither do we support more than one page range, so limit those - // options - pd->Flags |= PD_NOCURRENTPAGE; + // Disable Current Page option if not required as default is Enabled + if (!pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage)) + pd->Flags |= PD_NOCURRENTPAGE; + + // Default to showing the General tab first pd->nStartPage = START_PAGE_GENERAL; + + // We don't support more than one page range in the QPrinter API yet. pd->nPageRanges = 1; pd->nMaxPageRanges = 1; @@ -153,7 +156,10 @@ static void qt_win_read_back_PRINTDLGEX(PRINTDLGEX *pd, QPrintDialog *pdlg, QPri } else if (pd->Flags & PD_PAGENUMS) { pdlg->setPrintRange(QPrintDialog::PageRange); pdlg->setFromTo(pd->lpPageRanges[0].nFromPage, pd->lpPageRanges[0].nToPage); - } else { + } else if (pd->Flags & PD_CURRENTPAGE) { + pdlg->setPrintRange(QPrintDialog::CurrentPage); + pdlg->setFromTo(0, 0); + } else { // PD_ALLPAGES pdlg->setPrintRange(QPrintDialog::AllPages); pdlg->setFromTo(0, 0); } diff --git a/src/gui/dialogs/qprintsettingsoutput.ui b/src/gui/dialogs/qprintsettingsoutput.ui index fc57e86..be91679 100644 --- a/src/gui/dialogs/qprintsettingsoutput.ui +++ b/src/gui/dialogs/qprintsettingsoutput.ui @@ -1,121 +1,114 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>QPrintSettingsOutput</class> - <widget class="QWidget" name="QPrintSettingsOutput" > - <property name="geometry" > + <widget class="QWidget" name="QPrintSettingsOutput"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>416</width> - <height>166</height> + <width>426</width> + <height>171</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Form</string> </property> - <layout class="QHBoxLayout" name="horizontalLayout_2" > - <property name="margin" > + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="margin"> <number>0</number> </property> <item> - <widget class="QTabWidget" name="tabs" > - <property name="currentIndex" > + <widget class="QTabWidget" name="tabs"> + <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="copiesTab" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>412</width> - <height>139</height> - </rect> - </property> - <attribute name="title" > + <widget class="QWidget" name="copiesTab"> + <attribute name="title"> <string>Copies</string> </attribute> - <layout class="QHBoxLayout" name="horizontalLayout" > + <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QGroupBox" name="gbPrintRange" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Minimum" hsizetype="Preferred" > + <widget class="QGroupBox" name="gbPrintRange"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Print range</string> </property> - <layout class="QVBoxLayout" name="_3" > - <property name="spacing" > + <layout class="QVBoxLayout" name="_3"> + <property name="spacing"> <number>4</number> </property> - <property name="margin" > + <property name="margin"> <number>6</number> </property> <item> - <widget class="QRadioButton" name="printAll" > - <property name="text" > + <widget class="QRadioButton" name="printAll"> + <property name="text"> <string>Print all</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <layout class="QHBoxLayout" name="_4" > - <property name="spacing" > + <layout class="QHBoxLayout" name="_4"> + <property name="spacing"> <number>6</number> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> <item> - <widget class="QRadioButton" name="printRange" > - <property name="text" > + <widget class="QRadioButton" name="printRange"> + <property name="text"> <string>Pages from</string> </property> </widget> </item> <item> - <widget class="QSpinBox" name="from" > - <property name="enabled" > + <widget class="QSpinBox" name="from"> + <property name="enabled"> <bool>false</bool> </property> - <property name="minimum" > + <property name="minimum"> <number>1</number> </property> - <property name="maximum" > + <property name="maximum"> <number>999</number> </property> </widget> </item> <item> - <widget class="QLabel" name="label_3" > - <property name="text" > + <widget class="QLabel" name="label_3"> + <property name="text"> <string>to</string> </property> </widget> </item> <item> - <widget class="QSpinBox" name="to" > - <property name="enabled" > + <widget class="QSpinBox" name="to"> + <property name="enabled"> <bool>false</bool> </property> - <property name="minimum" > + <property name="minimum"> <number>1</number> </property> - <property name="maximum" > + <property name="maximum"> <number>999</number> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>0</width> <height>20</height> @@ -126,18 +119,25 @@ </layout> </item> <item> - <widget class="QRadioButton" name="printSelection" > - <property name="text" > + <widget class="QRadioButton" name="printCurrentPage"> + <property name="text"> + <string>Current Page</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="printSelection"> + <property name="text"> <string>Selection</string> </property> </widget> </item> <item> - <spacer name="verticalSpacer" > - <property name="orientation" > + <spacer name="verticalSpacer"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>1</width> <height>1</height> @@ -149,37 +149,37 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox" > - <property name="title" > + <widget class="QGroupBox" name="groupBox"> + <property name="title"> <string>Output Settings</string> </property> - <layout class="QGridLayout" name="gridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="label" > - <property name="text" > + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> <string>Copies:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>copies</cstring> </property> </widget> </item> - <item row="0" column="1" colspan="2" > - <widget class="QSpinBox" name="copies" > - <property name="minimum" > + <item row="0" column="1" colspan="2"> + <widget class="QSpinBox" name="copies"> + <property name="minimum"> <number>1</number> </property> - <property name="maximum" > + <property name="maximum"> <number>999</number> </property> </widget> </item> - <item row="0" column="3" > - <spacer name="horizontalSpacer" > - <property name="orientation" > + <item row="0" column="3"> + <spacer name="horizontalSpacer"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>91</width> <height>20</height> @@ -187,36 +187,36 @@ </property> </spacer> </item> - <item row="1" column="0" colspan="2" > - <widget class="QCheckBox" name="collate" > - <property name="text" > + <item row="1" column="0" colspan="2"> + <widget class="QCheckBox" name="collate"> + <property name="text"> <string>Collate</string> </property> </widget> </item> - <item rowspan="2" row="1" column="2" colspan="2" > - <widget class="QLabel" name="outputIcon" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Ignored" hsizetype="Ignored" > + <item row="1" column="2" rowspan="2" colspan="2"> + <widget class="QLabel" name="outputIcon"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Ignored" vsizetype="Ignored"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> </widget> </item> - <item row="2" column="0" colspan="2" > - <widget class="QCheckBox" name="reverse" > - <property name="text" > + <item row="2" column="0" colspan="2"> + <widget class="QCheckBox" name="reverse"> + <property name="text"> <string>Reverse</string> </property> </widget> </item> - <item row="3" column="0" colspan="4" > - <spacer name="verticalSpacer_2" > - <property name="orientation" > + <item row="3" column="0" colspan="4"> + <spacer name="verticalSpacer_2"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>0</width> <height>1</height> @@ -229,31 +229,23 @@ </item> </layout> </widget> - <widget class="QWidget" name="optionsTab" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>412</width> - <height>139</height> - </rect> - </property> - <attribute name="title" > + <widget class="QWidget" name="optionsTab"> + <attribute name="title"> <string>Options</string> </attribute> - <layout class="QGridLayout" name="gridLayout_2" > - <item row="0" column="1" > - <widget class="QGroupBox" name="colorMode" > - <property name="title" > + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="1"> + <widget class="QGroupBox" name="colorMode"> + <property name="title"> <string>Color Mode</string> </property> - <layout class="QGridLayout" name="gridLayout_4" > - <item row="2" column="0" > - <spacer name="verticalSpacer_6" > - <property name="orientation" > + <layout class="QGridLayout" name="gridLayout_4"> + <item row="2" column="0"> + <spacer name="verticalSpacer_6"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>1</width> <height>0</height> @@ -261,19 +253,19 @@ </property> </spacer> </item> - <item row="0" column="0" > - <widget class="QRadioButton" name="color" > - <property name="text" > + <item row="0" column="0"> + <widget class="QRadioButton" name="color"> + <property name="text"> <string>Color</string> </property> </widget> </item> - <item rowspan="3" row="0" column="1" > - <widget class="QLabel" name="colorIcon" /> + <item row="0" column="1" rowspan="3"> + <widget class="QLabel" name="colorIcon"/> </item> - <item row="1" column="0" > - <widget class="QRadioButton" name="grayscale" > - <property name="text" > + <item row="1" column="0"> + <widget class="QRadioButton" name="grayscale"> + <property name="text"> <string>Grayscale</string> </property> </widget> @@ -281,42 +273,42 @@ </layout> </widget> </item> - <item row="0" column="0" > - <widget class="QGroupBox" name="duplex" > - <property name="title" > + <item row="0" column="0"> + <widget class="QGroupBox" name="duplex"> + <property name="title"> <string>Duplex Printing</string> </property> - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QRadioButton" name="noDuplex" > - <property name="text" > + <widget class="QRadioButton" name="noDuplex"> + <property name="text"> <string>None</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QRadioButton" name="duplexLong" > - <property name="text" > + <widget class="QRadioButton" name="duplexLong"> + <property name="text"> <string>Long side</string> </property> </widget> </item> <item> - <widget class="QRadioButton" name="duplexShort" > - <property name="text" > + <widget class="QRadioButton" name="duplexShort"> + <property name="text"> <string>Short side</string> </property> </widget> </item> <item> - <spacer name="verticalSpacer_42" > - <property name="orientation" > + <spacer name="verticalSpacer_42"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>1</width> <height>0</height> @@ -341,11 +333,11 @@ <receiver>from</receiver> <slot>setEnabled(bool)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>76</x> <y>59</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>122</x> <y>57</y> </hint> @@ -357,11 +349,11 @@ <receiver>to</receiver> <slot>setEnabled(bool)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>69</x> <y>67</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>215</x> <y>67</y> </hint> 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..485bfbf 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -43,7 +43,10 @@ #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> #include <QtCore/qdebug.h> + #include "qegl_p.h" +#include "qeglcontext_p.h" + QT_BEGIN_NAMESPACE @@ -54,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) @@ -87,15 +88,177 @@ bool QEglContext::isCurrent() const return current; } +EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options) +{ + 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 + } + + if (options & Translucent) + configAttribs.setValue(EGL_ALPHA_SIZE, 1); + + *targetConfig = chooseConfig(&configAttribs, QEgl::BestPixelFormat); + return *targetConfig; +} + + // 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; - 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 @@ -104,7 +267,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 @@ -125,7 +288,7 @@ bool QEglContext::chooseConfig alpha == props.value(EGL_ALPHA_SIZE))) { cfg = configs[index]; delete [] configs; - return true; + return cfg; } } delete [] configs; @@ -142,11 +305,23 @@ bool QEglContext::chooseConfig qWarning() << "QEglContext::chooseConfig(): Could not find a suitable EGL configuration"; qWarning() << "Requested:" << props.toString(); qWarning() << "Available:"; - dumpAllConfigs(); + 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) { @@ -172,9 +347,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; @@ -183,7 +358,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; } } @@ -240,9 +415,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; } @@ -269,9 +444,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; } @@ -291,9 +466,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; } @@ -330,43 +505,43 @@ 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 +int QEglContext::configAttrib(int name) 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; + EGLint value; + EGLBoolean success = eglGetConfigAttrib(QEgl::display(), cfg, name, &value); + if (success) + return value; + else + return EGL_DONT_CARE; } -EGLDisplay QEglContext::display() +QEglProperties QEglContext::configProperties() const { + return QEglProperties(config()); +} + +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; } } @@ -374,15 +549,49 @@ EGLDisplay QEglContext::display() return dpy; } -#if !defined(Q_WS_X11) && !defined(Q_WS_WINCE) // WinCE & X11 implement this properly -EGLNativeDisplayType QEglContext::nativeDisplay() +#ifndef Q_WS_X11 +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { - return EGL_DEFAULT_DISPLAY; + // 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<QPixmap *>(device)); + ok = (pixmapDrawable != 0); + } else if (devType == QInternal::Widget) { + windowDrawable = nativeWindow(static_cast<QWidget *>(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; } #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 @@ -408,8 +617,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; @@ -418,23 +643,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<QByteArray> extensions = QByteArray(reinterpret_cast<const char *> - (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 87ed818..ffb45aa 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -53,13 +53,36 @@ // We mean it. // -#include <QtCore/qsize.h> -#include <QtGui/qimage.h> +QT_BEGIN_INCLUDE_NAMESPACE -#include <private/qeglproperties_p.h> +#if defined(QT_GLES_EGL) +#include <GLES/egl.h> +#else +#include <EGL/egl.h> +#endif -QT_BEGIN_INCLUDE_NAMESPACE +#if defined(Q_WS_X11) +// If <EGL/egl.h> included <X11/Xlib.h>, 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 <X11/Xlib.h> +#include <X11/Xutil.h> +#undef Bool +#undef Status +#undef None +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut +#undef Type +#undef FontChange +#undef CursorShape +#undef Unsorted +#undef GrayScale +#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 +92,68 @@ 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; } +QT_END_INCLUDE_NAMESPACE - QEgl::API api() const { return apiType; } - void setApi(QEgl::API api) { apiType = api; } +#include <QtGui/qpaintdevice.h> - 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); +QT_BEGIN_NAMESPACE - bool makeCurrent(EGLSurface surface); - bool doneCurrent(); - bool lazyDoneCurrent(); - bool swapBuffers(EGLSurface surface); +#define QEGL_NO_CONFIG ((EGLConfig)-1) - void waitNative(); - void waitClient(); +class QEglProperties; - bool configAttrib(int name, EGLint *value) const; +namespace QEgl { + enum API + { + OpenGL, + OpenVG + }; - static void clearError() { eglGetError(); } - static EGLint error() { return eglGetError(); } - static QString errorString(EGLint code); + enum PixelFormatMatch + { + ExactPixelFormat, + BestPixelFormat + }; - static EGLDisplay display(); + enum ConfigOptions + { + NoOptions = 0, + Translucent = 0x01, + Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL) + }; - EGLContext context() const { return ctx; } - void setContext(EGLContext context) { ctx = context; ownsContext = false;} + // 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(int devType, API api, ConfigOptions options); - EGLConfig config() const { return cfg; } - void setConfig(EGLConfig config) { cfg = config; } + 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); - QEglProperties configProperties(EGLConfig cfg = 0) const; + Q_GUI_EXPORT void dumpAllConfigs(); - void dumpAllConfigs(); + Q_GUI_EXPORT void clearError(); + Q_GUI_EXPORT EGLint error(); + Q_GUI_EXPORT QString errorString(EGLint code); + Q_GUI_EXPORT QString errorString(); - static QString extensions(); - static bool hasExtension(const char* extensionName); + Q_GUI_EXPORT QString extensions(); + Q_GUI_EXPORT bool hasExtension(const char* extensionName); -private: - QEgl::API apiType; - EGLContext ctx; - EGLConfig cfg; - EGLSurface currentSurface; - bool current; - bool ownsContext; - bool sharing; + Q_GUI_EXPORT EGLDisplay display(); - static EGLDisplay dpy; - static EGLNativeDisplayType nativeDisplay(); + Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay(); + Q_GUI_EXPORT EGLNativeWindowType nativeWindow(QWidget*); + Q_GUI_EXPORT EGLNativePixmapType nativePixmap(QPixmap*); - static QEglContext *currentContext(QEgl::API api); - static void setCurrentContext(QEgl::API api, QEglContext *context); +#ifdef Q_WS_X11 + Q_GUI_EXPORT VisualID getCompatibleVisualId(EGLConfig config); +#endif }; + 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..56383a5 100644 --- a/src/gui/egl/qegl_qws.cpp +++ b/src/gui/egl/qegl_qws.cpp @@ -42,7 +42,9 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> + #include "qegl_p.h" +#include "qeglcontext_p.h" #if !defined(QT_NO_EGL) @@ -53,17 +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 QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) -{ - Q_UNUSED(device); - Q_UNUSED(properties); - return EGL_NO_SURFACE; -} - static QScreen *screenForDevice(QPaintDevice *device) { QScreen *screen = qt_screen; @@ -101,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 5a010cd..9744ed0 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -42,48 +42,28 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> + #include "qegl_p.h" +#include "qeglcontext_p.h" #include <coecntrl.h> QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLNativeDisplayType QEgl::nativeDisplay() { - // 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<QWidget *>(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; - } + return EGL_DEFAULT_DISPLAY; +} - // 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; +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. diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index c9c9773..c07b20b 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -42,52 +42,16 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> + #include "qegl_p.h" +#include "qeglcontext_p.h" #include <windows.h> QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, 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<QWidget *>(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(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; -} - -EGLNativeDisplayType QEglContext::nativeDisplay() +EGLNativeDisplayType QEgl::nativeDisplay() { HWND win = (static_cast<QWidget*>(device))->winId(); HDC myDc = GetDC(win); @@ -98,6 +62,17 @@ EGLNativeDisplayType QEglContext::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 634ff13..483c01d 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -49,51 +49,15 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> -#include "qegl_p.h" +#include <QtGui/qcolormap.h> +#include "qegl_p.h" +#include "qeglcontext_p.h" QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, 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<QPixmap *>(device))->handle(); - ok = (pixmapDrawable != 0); - } else if (devType == QInternal::Widget) { - windowDrawable = (EGLNativeWindowType)(static_cast<QWidget *>(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(dpy, cfg, windowDrawable, props); - else - surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); - if (surf == EGL_NO_SURFACE) { - qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:" - << errorString(eglGetError()); - } - return surf; -} -EGLNativeDisplayType QEglContext::nativeDisplay() +EGLNativeDisplayType QEgl::nativeDisplay() { Display *xdpy = QX11Info::display(); if (!xdpy) { @@ -103,6 +67,16 @@ EGLNativeDisplayType QEglContext::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; @@ -153,4 +127,289 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) setVisualFormat(qt_x11Info(dev)); } +//#define QT_DEBUG_X11_VISUAL_SELECTION 1 + +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; + + eglGetConfigAttrib(display(), config, EGL_CONFIG_ID, &eglValue); + int configId = 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, configId); + 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, configId, configBitDepth); + visualId = 0; + } + } + XFree(chosenVisualInfo); + } + + if (visualId) { +#ifdef QT_DEBUG_X11_VISUAL_SELECTION + if (configAlphaSize > 0) + qDebug("Using ARGB Visual ID %d provided by EGL for config %d", (int)visualId, configId); + else + qDebug("Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, configId); +#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 (configAlphaSize > 0) + qDebug("Using ARGB Visual ID %d provided by XRender for EGL config %d", (int)visualId, configId); + else + qDebug("Using Opaque Visual ID %d provided by XRender for EGL config %d", (int)visualId, configId); +# 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, configId); +#endif + return visualId; + } + + qWarning("Unable to find an X11 visual which matches EGL config %d", configId); + 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<QPixmap*>(device)->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) + x11PixmapData = static_cast<QX11PixmapData*>(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<QWidget*>(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) { + // 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; + + // 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/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h new file mode 100644 index 0000000..7eec7eb --- /dev/null +++ b/src/gui/egl/qeglcontext_p.h @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** 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 <QtCore/qsize.h> +#include <QtGui/qimage.h> + +#include <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglproperties_p.h> + +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; + int configAttrib(int name) const; + + 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() const; + +private: + QEgl::API apiType; + EGLContext ctx; + EGLConfig cfg; + EGLSurface currentSurface; + bool current; + bool ownsContext; + bool sharing; + + 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..636f469 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -46,7 +46,8 @@ QT_BEGIN_NAMESPACE #include <QtCore/qdebug.h> #include <QtCore/qstringlist.h> -#include "qegl_p.h" +#include "qeglproperties_p.h" +#include "qeglcontext_p.h" // Initialize a property block. @@ -60,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. @@ -166,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) @@ -229,6 +241,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 @@ -273,12 +295,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/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index feed1d2..eebcf72 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -56,50 +56,10 @@ #include <QtCore/qvarlengtharray.h> #include <QtGui/qimage.h> -QT_BEGIN_INCLUDE_NAMESPACE - -#if defined(QT_GLES_EGL) -#include <GLES/egl.h> -#else -#include <EGL/egl.h> -#endif - -#if defined(Q_WS_X11) -// If <EGL/egl.h> included <X11/Xlib.h>, 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 <X11/Xlib.h> -#include <X11/Xutil.h> -#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 <QtGui/private/qegl_p.h> QT_BEGIN_NAMESPACE -namespace QEgl { - enum API - { - OpenGL, - OpenVG - }; - - enum PixelFormatMatch - { - ExactPixelFormat, - BestPixelFormat - }; -}; - class QX11Info; class QPaintDevice; @@ -122,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/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/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index d72833b..56f94a2 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -540,10 +540,10 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) - Q_PROPERTY(QPointF pos READ pos WRITE setPos) - Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) - Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) - Q_PROPERTY(qreal z READ zValue WRITE setZValue NOTIFY zChanged) + Q_PROPERTY(QPointF pos READ pos WRITE setPos FINAL) + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged FINAL) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged FINAL) + Q_PROPERTY(qreal z READ zValue WRITE setZValue NOTIFY zChanged FINAL) Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged) Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint) 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/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 365afdd..6bc02cc 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5972,12 +5972,12 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) QList<QGesture *> allGestures = event->gestures(); DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:" - << "Delivering gestures:" << allGestures; + << "Gestures:" << allGestures; QSet<QGesture *> 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()) { @@ -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/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 0c0a9bd..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; @@ -105,6 +110,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 @@ -130,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/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<aprec, zprec, alphaOnly>(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<aprec, zprec, alphaOnly>(temp, row, alpha); } diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 5128b64..eb3db21 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -2037,7 +2037,7 @@ bool QHeaderView::event(QEvent *e) updateSection(d->hover); } break; } - case QEvent::Timer: { // ### reimplement timerEvent() instead ? + case QEvent::Timer: { QTimerEvent *te = static_cast<QTimerEvent*>(e); if (te->timerId() == d->delayedResize.timerId()) { d->delayedResize.stop(); @@ -2610,7 +2610,7 @@ void QHeaderView::updateGeometries() Q_D(QHeaderView); d->layoutChildren(); if (d->hasAutoResizeSections()) - resizeSections(); + d->doDelayedResizeSections(); } /*! diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 3111896..bdc1205 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -1960,12 +1960,7 @@ QModelIndexList QTableView::selectedIndexes() const void QTableView::rowCountChanged(int /*oldCount*/, int /*newCount*/ ) { Q_D(QTableView); - updateGeometries(); - if (verticalScrollMode() == QAbstractItemView::ScrollPerItem) - d->verticalHeader->setOffsetToSectionPosition(verticalScrollBar()->value()); - else - d->verticalHeader->setOffset(verticalScrollBar()->value()); - d->viewport->update(); + d->doDelayedItemsLayout(); } /*! diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 37168eb..1145235 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -2524,8 +2524,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end) d->viewItems[parentItem].hasChildren = true; d->updateChildCount(parentItem, delta); - updateGeometries(); - viewport()->update(); + d->doDelayedItemsLayout(); } else if ((parentItem != -1) && d->viewItems.at(parentItem).expanded) { d->doDelayedItemsLayout(); } else if (parentItem != -1 && (d->model->rowCount(parent) == end - start + 1)) { @@ -3780,8 +3779,7 @@ void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent, } } if (after) { - q->updateGeometries(); - viewport->update(); + doDelayedItemsLayout(); } else { //we have removed items: we should at least update the scroll bar values. // They are used to determine the item geometry. diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 4ec2ae2..fea8c37 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) @@ -2311,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 @@ -2339,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); @@ -3013,7 +3027,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 +3087,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<QWidget> qt_button_down; // widget got last button-down +QWidget * qt_button_down; // widget got last button-down +QPointer<QWidget> 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/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp index a59bb98..f7c0b6e 100644 --- a/src/gui/kernel/qclipboard.cpp +++ b/src/gui/kernel/qclipboard.cpp @@ -107,6 +107,12 @@ QT_BEGIN_NAMESPACE store or retrieve the clipboard contents in response to timer or non-user-input events. + \i Since there is no standard way to copy and paste files between + applications on X11, various MIME types and conventions are currently + in use. For instance, Nautilus expects files to be supplied with a + \c{x-special/gnome-copied-files} MIME type with data beginning with + the cut/copy action, a newline character, and the URL of the file. + \endlist \section1 Notes for Mac OS X Users 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 <private/qt_mac_p.h> #include <private/qmenubar_p.h> #include <qmenubar.h> +#include <private/qt_cocoa_helpers_mac_p.h> 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<const NSString*>(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/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 6a16403..f7cb21f 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) @@ -1003,7 +1028,10 @@ extern "C" { { 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; } 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<NSCursor *>(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<NSCursor *>(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<NSCursor *>(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; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9560952..3fbd978 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<QWidget> qt_button_down; //qapplication_mac.cpp +extern QWidget *qt_button_down; //qapplication_mac.cpp void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { @@ -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<QCocoaView *>(qt_mac_nativeview_for(widget)); + QT_MANGLE_NAMESPACE(QCocoaView) *cocoaView = reinterpret_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(qt_mac_nativeview_for(widget)); if (cocoaView && [cocoaView respondsToSelector:@selector(qt_qwidget)]) { [cocoaView qt_clearQWidget]; } @@ -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<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget]; } } else { - extern QPointer<QWidget> 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<EventRef>(const_cast<void *>([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<QWidget> 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); @@ -1355,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/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 2f6ec6b..ed9d5de 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 @@ -1121,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) { @@ -1168,6 +1170,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 +1269,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 +1443,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 +2316,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<QWidget*>(this); that->setAttribute(Qt::WA_NativeWindow); that->d_func()->createWinId(); @@ -2318,6 +2331,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 +2377,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 +5269,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<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent); +#endif if (sharedPainter) paintEngine->d_func()->systemClip = toBePainted; else @@ -5290,6 +5318,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<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent, false); +#endif restoreRedirected(); if (!sharedPainter) paintEngine->d_func()->systemRect = QRect(); @@ -5339,7 +5371,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; @@ -6469,7 +6500,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; @@ -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(); @@ -10262,6 +10293,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<<attribute); + else + data->widget_attributes &= ~(1<<attribute); + } else { + const int x = attribute - 8*sizeof(uint); + const int int_off = x / (8*sizeof(uint)); + if (on) + d->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. @@ -10288,19 +10342,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) } #endif - if (attribute < int(8*sizeof(uint))) { - if (on) - data->widget_attributes |= (1<<attribute); - else - data->widget_attributes &= ~(1<<attribute); - } else { - const int x = attribute - 8*sizeof(uint); - const int int_off = x / (8*sizeof(uint)); - if (on) - d->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) { @@ -10359,14 +10401,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(); } @@ -10433,7 +10472,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.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/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/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('#'))) { diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 891f4c2..5f70cb7 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<QSpanData *>(userData); if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) @@ -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<quint32, quint32>; qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16, quint16>; @@ -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) { 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); diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp index edf224d..ae21416 100644 --- a/src/gui/painting/qprinter.cpp +++ b/src/gui/painting/qprinter.cpp @@ -382,6 +382,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke \value AllPages All pages should be printed. \value Selection Only the selection should be printed. \value PageRange The specified page range should be printed. + \value CurrentPage Only the current page should be printed. \sa QAbstractPrintDialog::PrintRange */ @@ -571,6 +572,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke \value AllPages All the pages should be printed. \value Selection Only the selection should be printed. \value PageRange Print according to the from page and to page options. + \value CurrentPage Only the current page should be printed. \sa setPrintRange(), printRange() */ @@ -586,6 +588,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke \value PrintSelection Describes if printing selections should be enabled. \value PrintPageRange Describes if printing page ranges (from, to) should be enabled + \value PrintCurrentPage if Print Current Page option should be enabled \sa setOptionEnabled(), isOptionEnabled() */ diff --git a/src/gui/painting/qprinter.h b/src/gui/painting/qprinter.h index 6636179..996a954 100644 --- a/src/gui/painting/qprinter.h +++ b/src/gui/painting/qprinter.h @@ -124,7 +124,7 @@ public: enum OutputFormat { NativeFormat, PdfFormat, PostScriptFormat }; // ### Qt 5: Merge with QAbstractPrintDialog::PrintRange - enum PrintRange { AllPages, Selection, PageRange }; + enum PrintRange { AllPages, Selection, PageRange, CurrentPage }; enum Unit { Millimeter, 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/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<const QStyleOptionHeader *>(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<const QToolBar *>(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<const QStyleOptionFrame *>(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<const QStyleOptionTabWidgetFrame*>(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<const QStyleOptionSlider *>(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<const QStyleOptionSpinBox *>(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<const QStyleOptionSlider *>(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<const QStyleOptionProgressBar *>(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<const QStyleOptionHeader *>(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<const QStyleOptionMenuItem *>(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<const QStyleOptionButton *>(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<const QStyleOptionTab *>(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<const QStyleOptionProgressBar *>(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<const QStyleOptionProgressBar *>(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<const QStyleOptionSpinBox *>(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<const QStyleOptionComboBox *>(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<const QStyleOptionToolButton *>(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<QToolBar *>(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<const QStyleOptionButton *>(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<const QStyleOptionComboBox *>(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 <QtCore/QHash> #include <QtCore/QUrl> #include <QtCore/QLibrary> +#include <QtCore/QDebug> #include <private/qapplication_p.h> #include <private/qiconloader_p.h> @@ -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 *> 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<QString, GtkWidget*> oldMap = *gtkWidgetMap(); + QHash<QHashableLatin1Literal, GtkWidget*> oldMap = *gtkWidgetMap(); gtkWidgetMap()->clear(); - QHashIterator<QString, GtkWidget*> it(oldMap); + QHashIterator<QHashableLatin1Literal, GtkWidget*> 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<QHashableLatin1Literal, GtkWidget *>::const_iterator it = widgetMap->constBegin(); + it != widgetMap->constEnd(); ++it) + free(const_cast<char *>(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<char *>(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<const uchar *>(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..6ee7904 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -56,6 +56,10 @@ #include <QtCore/qglobal.h> #if !defined(QT_NO_STYLE_GTK) +#include <QtCore/qstring.h> +#include <QtCore/qstringbuilder.h> +#include <QtCore/qcoreapplication.h> + #include <QtGui/QFileDialog> #include <QtGui/QGtkStyle> @@ -72,6 +76,54 @@ typedef unsigned long XID; #define QLS(x) QLatin1String(x) +QT_BEGIN_NAMESPACE + +// ### Qt 4.7 - merge with QLatin1Literal +class QHashableLatin1Literal +{ +public: + int size() const { return m_size; } + const char *data() const { return m_data; } + + template <int N> + 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<int *>(&m_size) = other.m_size; + *const_cast<char **>(&m_data) = const_cast<char *>(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); + +QT_END_NAMESPACE + class GConf; class GConfClient; @@ -252,7 +304,6 @@ typedef char* (*Ptr_gnome_icon_lookup_sync) ( GnomeIconLookupFlags flags, GnomeIconLookupResultFlags *result); - class QGtkStylePrivate : public QCleanlooksStylePrivate { Q_DECLARE_PUBLIC(QGtkStyle) @@ -262,8 +313,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 +469,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<QString, GtkWidget*> WidgetMap; + typedef QHash<QHashableLatin1Literal, GtkWidget*> 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 +502,7 @@ protected: private: static QList<QGtkStylePrivate *> instances; + static WidgetMap *widgetMap; friend class QGtkStyleUpdateScheduler; }; 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 <qstyleoption.h> #include <qpainter.h> #include <qpixmapcache.h> +#include <qstringbuilder.h> #include <private/qmath_p.h> #include <private/qstyle_p.h> #include <qmath.h> @@ -56,22 +57,67 @@ QT_BEGIN_NAMESPACE +// internal helper. Converts an integer value to an unique string token +template <typename T> +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<const char *>(&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 <typename T> +struct QConcatenable<HexString<T> > +{ + typedef HexString<T> type; + enum { ExactSize = true }; + static int size(const HexString<T> &str) { return sizeof(str.val) * 2; } + static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); } +}; + namespace QStyleHelper { QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size) { const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(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<uint>(option->state) + % QLatin1Char('-') + % HexString<uint>(option->direction) + % QLatin1Char('-') + % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u) + % QLatin1Char('-') + % HexString<quint64>(option->palette.cacheKey()) + % QLatin1Char('-') + % HexString<uint>(size.width()) + % QLatin1Char('x') + % HexString<uint>(size.height()); + #ifndef QT_NO_SPINBOX if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(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<uint>(spinBox->buttonSymbols) + % QLatin1Char('-') + % HexString<uint>(spinBox->stepEnabled) + % QLatin1Char('-') + % QLatin1Char(spinBox->frame ? '1' : '0'); } #endif // QT_NO_SPINBOX return tmp; 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<const QStyleOptionButton *>(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<const QStyleOptionButton *>(opt)) { diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 6750c09..e594b7e 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<QTextDocument> doc; void _q_reformatBlocks(int from, int charsRemoved, int charsAdded); - void reformatBlock(QTextBlock block); - + void reformatBlocks(int from, int charsRemoved, int charsAdded); + void reformatBlock(const 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() { @@ -83,17 +84,19 @@ public: return; rehighlightPending = false; q_func()->rehighlight(); - return; } void applyFormatChanges(); QVector<QTextCharFormat> formatChanges; QTextBlock currentBlock; bool rehighlightPending; + bool inReformatBlocks; }; void QSyntaxHighlighterPrivate::applyFormatChanges() { + bool formatsChanged = false; + QTextLayout *layout = currentBlock.layout(); QList<QTextLayout::FormatRange> ranges = layout->additionalFormats(); @@ -101,19 +104,26 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() const int preeditAreaStart = layout->preeditAreaPosition(); const int preeditAreaLength = layout->preeditAreaText().length(); - QList<QTextLayout::FormatRange>::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<QTextLayout::FormatRange>::Iterator it = ranges.begin(); + while (it != ranges.end()) { + if (it->start >= preeditAreaStart + && it->start + it->length <= preeditAreaStart + preeditAreaLength) { + ++it; + } else { + it = ranges.erase(it); + formatsChanged = true; + } + } + } else if (!ranges.isEmpty()) { + ranges.clear(); + formatsChanged = true; } QTextCharFormat emptyFormat; QTextLayout::FormatRange r; - r.start = r.length = -1; + r.start = -1; int i = 0; while (i < formatChanges.count()) { @@ -135,34 +145,46 @@ 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; + formatsChanged = true; + 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; + 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) { - Q_UNUSED(charsRemoved); + if (!inReformatBlocks) + reformatBlocks(from, charsRemoved, charsAdded); +} + +void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded) +{ rehighlightPending = false; QTextBlock block = doc->findBlock(from); @@ -191,21 +213,18 @@ void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, in formatChanges.clear(); } -void QSyntaxHighlighterPrivate::reformatBlock(QTextBlock block) +void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) { Q_Q(QSyntaxHighlighter); 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()); applyFormatChanges(); - doc->markContentsDirty(block.position(), block.length()); - currentBlock = QTextBlock(); } @@ -349,8 +368,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())); } } @@ -391,11 +410,16 @@ 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; + QTextCursor cursor(block); d->rehighlight(cursor, QTextCursor::EndOfBlock); + + if (rehighlightPending) + d->rehighlightPending = rehighlightPending; } /*! @@ -460,7 +484,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; @@ -628,7 +651,7 @@ QTextBlockUserData *QSyntaxHighlighter::currentBlockUserData() const \since 4.4 Returns the current text block. - */ +*/ QTextBlock QSyntaxHighlighter::currentBlock() const { Q_D(const QSyntaxHighlighter); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 02eae98..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<const ushort *>(m_string.unicode()), start, length); else if(caps == QFont::Capitalize) generateScriptItemsCapitalize(start, length); else if(caps != QFont::MixedCase) { @@ -1434,9 +1434,7 @@ void QTextEngine::itemize() const layoutData->hasBidi = bidiItemize(const_cast<QTextEngine *>(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<const ushort *>(layoutData->string.unicode()); const ushort *e = uc + length; int lastScript = QUnicodeTables::Common; while (uc < e) { 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<QMenu> menu = d->edit->createStandardContextMenu(); + if (!menu) + return; + + d->reset(); QAction *selAll = new QAction(tr("&Select All"), menu); menu->insertAction(d->edit->d_func()->selectAllAction, 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/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::MatchFlags>(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::MatchFlags>(Qt::MatchExactly|Qt::MatchCaseSensitive)) const; enum InsertPolicy { NoInsert, 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<QDockWidget*> 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; 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" 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); diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 0ba8b9f..817547c 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 @@ -542,11 +539,16 @@ 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; } + if (mode != Normal) { + imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } else { + imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } setInputMethodHints(imHints); d->control->setEchoMode(mode); update(); @@ -2038,9 +2040,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) 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); 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; diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index e2cf25b..9a4916e 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -85,9 +85,8 @@ QT_BEGIN_NAMESPACE -QPointer<QMenu> 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 - 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 @@ -543,15 +542,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<QMenu*>(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 +555,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason #ifdef QT3_SUPPORT emitHighlighted = action; #endif + currentAction = action; if (action) { if (!action->isSeparator()) { @@ -2383,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; @@ -2817,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)); } @@ -2855,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_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 + 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<QMenu> 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; 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())); diff --git a/src/plugins/qdeclarativemodules/qdeclarativemodules.pro b/src/imports/imports.pro index 0a6f444..8b47043 100644 --- a/src/plugins/qdeclarativemodules/qdeclarativemodules.pro +++ b/src/imports/imports.pro @@ -2,5 +2,6 @@ TEMPLATE = subdirs SUBDIRS += widgets +contains(QT_CONFIG, webkit): SUBDIRS += webkit contains(QT_CONFIG, multimedia): SUBDIRS += multimedia diff --git a/src/multimedia/qml/multimediadeclarative.cpp b/src/imports/multimedia/multimedia.cpp index 7f5298f..a2e74f4 100644 --- a/src/multimedia/qml/multimediadeclarative.cpp +++ b/src/imports/multimedia/multimedia.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,32 +39,35 @@ ** ****************************************************************************/ -#include <QtMultimedia/multimediadeclarative.h> +#include <QtDeclarative/qdeclarativeextensionplugin.h> +#include <QtDeclarative/qdeclarative.h> #include <QtMultimedia/private/qsoundeffect_p.h> -#include <QtMultimedia/private/qdeclarativeaudio_p.h> -#include <QtMultimedia/private/qdeclarativevideo_p.h> +#include "qdeclarativevideo_p.h" +#include "qdeclarativeaudio_p.h" -QT_BEGIN_NAMESPACE -namespace QtMultimedia -{ +QML_DECLARE_TYPE(QSoundEffect) -/*! - Register the Multimedia QML elements. - \internal -*/ +QT_BEGIN_NAMESPACE -void qRegisterDeclarativeElements(const char *uri) +class QMultimediaDeclarativeModule : public QDeclarativeExtensionPlugin { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); + Q_OBJECT +public: + virtual void registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); - qmlRegisterType<QSoundEffect>(uri, 4, 7, "SoundEffect"); - qmlRegisterType<QDeclarativeAudio>(uri, 4, 7, "Audio"); - qmlRegisterType<QDeclarativeVideo>(uri, 4, 7, "Video"); -} - -} + qmlRegisterType<QSoundEffect>(uri, 4, 7, "SoundEffect"); + qmlRegisterType<QDeclarativeAudio>(uri, 4, 7, "Audio"); + qmlRegisterType<QDeclarativeVideo>(uri, 4, 7, "Video"); + } +}; QT_END_NAMESPACE +#include "multimedia.moc" + +Q_EXPORT_PLUGIN2(qmultimediadeclarativemodule, QT_PREPEND_NAMESPACE(QMultimediaDeclarativeModule)); + diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro new file mode 100644 index 0000000..117aa9b --- /dev/null +++ b/src/imports/multimedia/multimedia.pro @@ -0,0 +1,26 @@ +TARGET = multimedia +TARGETPATH = $$[QT_INSTALL_IMPORTS]/Qt/multimedia +include(../qimportbase.pri) + +QT += multimedia declarative + +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 = $$TARGETPATH + +qmldir.files += $$QT_BUILD_TREE/imports/Qt/multimedia/qmldir +qmldir.path += $$TARGETPATH + +INSTALLS += target qmldir diff --git a/src/multimedia/qml/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp index 1cbf594..df2888c 100644 --- a/src/multimedia/qml/qdeclarativeaudio.cpp +++ b/src/imports/multimedia/qdeclarativeaudio.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/multimedia/qml/qdeclarativeaudio_p.h b/src/imports/multimedia/qdeclarativeaudio_p.h index d1fb275..9881dbc 100644 --- a/src/multimedia/qml/qdeclarativeaudio_p.h +++ b/src/imports/multimedia/qdeclarativeaudio_p.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -53,7 +53,7 @@ // We mean it. // -#include <QtMultimedia/private/qdeclarativemediabase_p.h> +#include "qdeclarativemediabase_p.h" #include <QtCore/qbasictimer.h> #include <QtDeclarative/qdeclarativeitem.h> @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE class QTimerEvent; -class Q_AUTOTEST_EXPORT QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus +class QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/multimedia/qml/qdeclarativemediabase.cpp b/src/imports/multimedia/qdeclarativemediabase.cpp index e054cb2..8e87e44 100644 --- a/src/multimedia/qml/qdeclarativemediabase.cpp +++ b/src/imports/multimedia/qdeclarativemediabase.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "QtMultimedia/private/qdeclarativemediabase_p.h" +#include "qdeclarativemediabase_p.h" #include <QtCore/qcoreevent.h> #include <QtCore/qurl.h> @@ -48,7 +48,7 @@ #include <QtMultimedia/qmediaservice.h> #include <QtMultimedia/qmediaserviceprovider.h> #include <QtMultimedia/qmetadatacontrol.h> -#include <QtMultimedia/private/qmetadatacontrolmetaobject_p.h> +#include "qmetadatacontrolmetaobject_p.h" diff --git a/src/multimedia/qml/qdeclarativemediabase_p.h b/src/imports/multimedia/qdeclarativemediabase_p.h index 2fc48db..b40e84e 100644 --- a/src/multimedia/qml/qdeclarativemediabase_p.h +++ b/src/imports/multimedia/qdeclarativemediabase_p.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -67,7 +67,7 @@ class QMetaDataControl; class QMetaDataControlMetaObject; class QDeclarativeMediaBaseAnimation; -class Q_AUTOTEST_EXPORT QDeclarativeMediaBase +class QDeclarativeMediaBase { public: QDeclarativeMediaBase(); diff --git a/src/multimedia/qml/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp index 7f62075..064f242 100644 --- a/src/multimedia/qml/qdeclarativevideo.cpp +++ b/src/imports/multimedia/qdeclarativevideo.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/multimedia/qml/qdeclarativevideo_p.h b/src/imports/multimedia/qdeclarativevideo_p.h index d5ebde1..fb13519 100644 --- a/src/multimedia/qml/qdeclarativevideo_p.h +++ b/src/imports/multimedia/qdeclarativevideo_p.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -53,7 +53,7 @@ // We mean it. // -#include <QtMultimedia/private/qdeclarativemediabase_p.h> +#include "qdeclarativemediabase_p.h" #include <QtMultimedia/qgraphicsvideoitem.h> @@ -69,7 +69,7 @@ class QTimerEvent; class QVideoSurfaceFormat; -class Q_AUTOTEST_EXPORT QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase +class QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/multimedia/qml/qmetadatacontrolmetaobject.cpp b/src/imports/multimedia/qmetadatacontrolmetaobject.cpp index 47b6382..e90cbd6 100644 --- a/src/multimedia/qml/qmetadatacontrolmetaobject.cpp +++ b/src/imports/multimedia/qmetadatacontrolmetaobject.cpp @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtMultimedia/private/qmetadatacontrolmetaobject_p.h> +#include "qmetadatacontrolmetaobject_p.h" #include <QtMultimedia/qmetadatacontrol.h> diff --git a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h b/src/imports/multimedia/qmetadatacontrolmetaobject_p.h index ec4df05..c381f2d 100644 --- a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h +++ b/src/imports/multimedia/qmetadatacontrolmetaobject_p.h @@ -1,10 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** 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 QtMultimedia module of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/imports/Qt/multimedia/qmldir b/src/imports/multimedia/qmldir index 0e6f656..0e6f656 100644 --- a/imports/Qt/multimedia/qmldir +++ b/src/imports/multimedia/qmldir diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri new file mode 100644 index 0000000..363dd88 --- /dev/null +++ b/src/imports/qimportbase.pri @@ -0,0 +1,33 @@ +TEMPLATE = lib +CONFIG += qt plugin + +win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release + +isEmpty(TARGETPATH) { + error("qimportbase.pri: You must provide a TARGETPATH!") +} +isEmpty(TARGET) { + error("qimportbase.pri: You must provide a TARGET!") +} + +QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir +copy2build.input = QMLDIRFILE +copy2build.output = $$TARGETPATH/qmldir +isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS +copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy2build.name = COPY ${QMAKE_FILE_IN} +copy2build.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy2build + +TARGET = $$qtLibraryTarget($$TARGET) +contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols + +include(../../qt_targets.pri) + +wince*:LIBS += $$QMAKE_LIBS_GUI + +symbian: { + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = All -Tcb + load(armcc_warnings) +} diff --git a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp b/src/imports/webkit/plugin.cpp index 8becbf3..799fe9e 100644 --- a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp +++ b/src/imports/webkit/plugin.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -41,23 +41,27 @@ #include <QtDeclarative/qdeclarativeextensionplugin.h> #include <QtDeclarative/qdeclarative.h> -#include <QtMultimedia/multimediadeclarative.h> + +#include "qdeclarativewebview_p.h" +#include "qdeclarativewebview_p_p.h" QT_BEGIN_NAMESPACE -class QMultimediaQmlModule : public QDeclarativeExtensionPlugin +class WebKitQmlPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT public: virtual void registerTypes(const char *uri) { - QtMultimedia::qRegisterDeclarativeElements(uri); + Q_ASSERT(QLatin1String(uri) == QLatin1String("org.webkit")); + QML_REGISTER_NOCREATE_TYPE(QDeclarativeWebSettings); + qmlRegisterType<QDeclarativeWebView>(uri,1,0,"WebView"); } }; QT_END_NAMESPACE -#include "multimedia.moc" +#include "plugin.moc" -Q_EXPORT_PLUGIN2(qmultimediaqmlmodule, QT_PREPEND_NAMESPACE(QMultimediaQmlModule)); +Q_EXPORT_PLUGIN2(webkitqmlplugin, QT_PREPEND_NAMESPACE(WebKitQmlPlugin)); diff --git a/src/declarative/graphicsitems/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp index a2b16ba..d78ba28 100644 --- a/src/declarative/graphicsitems/qdeclarativewebview.cpp +++ b/src/imports/webkit/qdeclarativewebview.cpp @@ -42,11 +42,11 @@ #include "qdeclarativewebview_p.h" #include "qdeclarativewebview_p_p.h" -#include "qdeclarativepainteditem_p_p.h" +#include <private/qdeclarativepainteditem_p_p.h> #include <qdeclarative.h> #include <qdeclarativeengine.h> -#include <qdeclarativestate_p.h> +#include <private/qdeclarativestate_p.h> #include <QDebug> #include <QPen> @@ -61,7 +61,7 @@ #include <QtWebKit/QWebFrame> #include <QtWebKit/QWebElement> #include <QtWebKit/QWebSettings> -#include <qlistmodelinterface_p.h> +#include <private/qlistmodelinterface_p.h> QT_BEGIN_NAMESPACE @@ -128,6 +128,8 @@ public: usually laying out the web content to fit the preferredWidth. \qml + import org.webkit 1.0 + WebView { url: "http://www.nokia.com" width: 490 diff --git a/src/declarative/graphicsitems/qdeclarativewebview_p.h b/src/imports/webkit/qdeclarativewebview_p.h index a65aab3..145e74b 100644 --- a/src/declarative/graphicsitems/qdeclarativewebview_p.h +++ b/src/imports/webkit/qdeclarativewebview_p.h @@ -42,7 +42,9 @@ #ifndef QDECLARATIVEWEBVIEW_H #define QDECLARATIVEWEBVIEW_H -#include "qdeclarativepainteditem_p.h" +#include "webkitqmlplugin_export.h" + +#include <private/qdeclarativepainteditem_p.h> #include <QtGui/QAction> #include <QtCore/QUrl> @@ -57,11 +59,12 @@ class QWebSettings; QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +class QDeclarativeWebSettings; class QDeclarativeWebViewPrivate; class QNetworkRequest; class QDeclarativeWebView; -class Q_DECLARATIVE_EXPORT QDeclarativeWebPage : public QWebPage +class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebPage : public QWebPage { Q_OBJECT public: @@ -82,11 +85,10 @@ private: class QDeclarativeWebViewAttached; -class QDeclarativeWebSettings; //### TODO: browser plugins -class Q_DECLARATIVE_EXPORT QDeclarativeWebView : public QDeclarativePaintedItem +class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebView : public QDeclarativePaintedItem { Q_OBJECT diff --git a/src/declarative/graphicsitems/qdeclarativewebview_p_p.h b/src/imports/webkit/qdeclarativewebview_p_p.h index 258b472..3ad9e9a 100644 --- a/src/declarative/graphicsitems/qdeclarativewebview_p_p.h +++ b/src/imports/webkit/qdeclarativewebview_p_p.h @@ -42,6 +42,8 @@ #ifndef QDECLARATIVEWEBVIEW_P_H #define QDECLARATIVEWEBVIEW_P_H +#include "webkitqmlplugin_export.h" + #include <qdeclarative.h> #include <QtWebKit/QWebPage> @@ -52,7 +54,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QDeclarativeWebSettings : public QObject { +class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebSettings : public QObject { Q_OBJECT Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily) diff --git a/src/imports/webkit/qmldir b/src/imports/webkit/qmldir new file mode 100644 index 0000000..258aa2c --- /dev/null +++ b/src/imports/webkit/qmldir @@ -0,0 +1 @@ +plugin webkitqmlplugin diff --git a/src/imports/webkit/webkit.pro b/src/imports/webkit/webkit.pro new file mode 100644 index 0000000..76b46f1 --- /dev/null +++ b/src/imports/webkit/webkit.pro @@ -0,0 +1,19 @@ +TARGET = webkitqmlplugin +TARGETPATH = $$[QT_INSTALL_IMPORTS]/org/webkit +include(../qimportbase.pri) + +QT += webkit declarative +DEFINES += WEBKITQMLPLUGIN_EXPORTS + +SOURCES += qdeclarativewebview.cpp plugin.cpp +HEADERS += qdeclarativewebview_p.h \ + qdeclarativewebview_p_p.h \ + webkitqmlplugin_export.h + +QTDIR_build:DESTDIR = $$TARGETPATH +target.path = $$TARGETPATH + +qmldir.files += $$QT_BUILD_TREE/imports/org/webkit/qmldir +qmldir.path += $$TARGETPATH + +INSTALLS += target qmldir diff --git a/src/multimedia/qml/multimediadeclarative.h b/src/imports/webkit/webkitqmlplugin_export.h index 29af65a..974fd24 100644 --- a/src/multimedia/qml/multimediadeclarative.h +++ b/src/imports/webkit/webkitqmlplugin_export.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtMultimedia module of the Qt Toolkit. +** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,22 +39,15 @@ ** ****************************************************************************/ -#ifndef QTMULTIMEDIA_QML_H -#define QTMULTIMEDIA_QML_H +#ifndef WEBKITQMLPLUGIN_EXPORT_H +#define WEBKITQMLPLUGIN_EXPORT_H -#include <QtCore/qglobal.h> +#include <QtCore/QtGlobal> -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE +#if defined WEBKITQMLPLUGIN_EXPORTS +# define WEBKITQMLPLUGIN_EXPORT Q_DECL_EXPORT +#else +# define WEBKITQMLPLUGIN_EXPORT Q_DECL_IMPORT +#endif -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 +#endif // WEBKITQMLPLUGIN_EXPORT_H diff --git a/src/plugins/qdeclarativemodules/widgets/graphicslayouts.cpp b/src/imports/widgets/graphicslayouts.cpp index fc15ad2..fc15ad2 100644 --- a/src/plugins/qdeclarativemodules/widgets/graphicslayouts.cpp +++ b/src/imports/widgets/graphicslayouts.cpp diff --git a/src/plugins/qdeclarativemodules/widgets/graphicslayouts_p.h b/src/imports/widgets/graphicslayouts_p.h index f9b9ae8..f9b9ae8 100644 --- a/src/plugins/qdeclarativemodules/widgets/graphicslayouts_p.h +++ b/src/imports/widgets/graphicslayouts_p.h diff --git a/src/plugins/qdeclarativemodules/widgets/graphicswidgets.cpp b/src/imports/widgets/graphicswidgets.cpp index 062e516..062e516 100644 --- a/src/plugins/qdeclarativemodules/widgets/graphicswidgets.cpp +++ b/src/imports/widgets/graphicswidgets.cpp diff --git a/src/plugins/qdeclarativemodules/widgets/graphicswidgets_p.h b/src/imports/widgets/graphicswidgets_p.h index 2c2b707..2c2b707 100644 --- a/src/plugins/qdeclarativemodules/widgets/graphicswidgets_p.h +++ b/src/imports/widgets/graphicswidgets_p.h diff --git a/imports/Qt/widgets/qmldir b/src/imports/widgets/qmldir index 6f19878..6f19878 100644 --- a/imports/Qt/widgets/qmldir +++ b/src/imports/widgets/qmldir diff --git a/src/plugins/qdeclarativemodules/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp index ec21cc4..ec21cc4 100644 --- a/src/plugins/qdeclarativemodules/widgets/widgets.cpp +++ b/src/imports/widgets/widgets.cpp diff --git a/src/plugins/qdeclarativemodules/widgets/widgets.pro b/src/imports/widgets/widgets.pro index 3ec38da..b98be59 100644 --- a/src/plugins/qdeclarativemodules/widgets/widgets.pro +++ b/src/imports/widgets/widgets.pro @@ -1,5 +1,6 @@ TARGET = widgets -include(../../qpluginbase.pri) +TARGETPATH = $$[QT_INSTALL_IMPORTS]/Qt/widgets +include(../qimportbase.pri) QT += declarative @@ -12,9 +13,10 @@ HEADERS += \ graphicslayouts_p.h QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/Qt/widgets -target.path = $$[QT_INSTALL_IMPORTS]/Qt/widgets +target.path = $$TARGETPATH -qmldir.files += $$QT_BUILD_TREE/imports/Qt/widgets/qmldir -qmldir.path += $$[QT_INSTALL_IMPORTS]/Qt/widgets +# install qmldir file +qmldir.files += qmldir +qmldir.path = $$TARGETPATH INSTALLS += target qmldir diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index eb6505c..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. */ /*! @@ -268,7 +271,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())); QList<QMediaServiceProviderPlugin *>plugins; foreach (QObject *obj, loader()->instances(key)) { @@ -383,7 +386,8 @@ public: const QStringList& codecs, int flags) const { - QList<QObject*> instances = loader()->instances(serviceType); + QList<QObject*> instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); if (instances.isEmpty()) return QtMultimedia::NotSupported; @@ -395,14 +399,25 @@ public: QMediaServiceSupportedFormatsInterface *iface = qobject_cast<QMediaServiceSupportedFormatsInterface*>(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<QMediaServiceFeaturesInterface*>(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) @@ -424,7 +439,8 @@ public: QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const { - QList<QObject*> instances = loader()->instances(serviceType); + QList<QObject*> instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); QStringList supportedTypes; @@ -432,14 +448,25 @@ public: QMediaServiceSupportedFormatsInterface *iface = qobject_cast<QMediaServiceSupportedFormatsInterface*>(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<QMediaServiceFeaturesInterface*>(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) { @@ -457,7 +484,8 @@ public: { QList<QByteArray> res; - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach(QObject *obj, loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length()))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj); @@ -471,7 +499,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<QMediaServiceSupportedDevicesInterface*>(obj); 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/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); diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri new file mode 100644 index 0000000..ff762e8 --- /dev/null +++ b/src/multimedia/effects/effects.pri @@ -0,0 +1,25 @@ + + +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 +} + +HEADERS += \ + $$PWD/qsoundeffect_p.h \ + $$PWD/wavedecoder_p.h + +SOURCES += \ + $$PWD/qsoundeffect.cpp \ + $$PWD/wavedecoder_p.cpp diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp index 541e6c9..2694023 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/effects/qsoundeffect.cpp @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE id: playSound source: "test.wav" } - MouseRegion { + MouseArea { id: playArea anchors.fill: parent onPressed: { diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/effects/qsoundeffect_p.h index 51ebe52..c5554bf 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/effects/qsoundeffect_p.h @@ -56,7 +56,6 @@ #include <QtCore/qobject.h> #include <QtCore/qurl.h> -#include <QtDeclarative/qdeclarative.h> QT_BEGIN_HEADER @@ -64,7 +63,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QSoundEffectPrivate; -class Q_AUTOTEST_EXPORT QSoundEffect : public QObject +class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -118,8 +117,6 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QSoundEffect)) - QT_END_HEADER diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/effects/qsoundeffect_pulse_p.cpp index 7e9a25c..d99bf4b 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/effects/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 <pulse/ext-stream-restore.h> #endif @@ -157,7 +157,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) { @@ -185,7 +185,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<PulseDaemon*>(userdata); @@ -301,7 +301,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( diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.h b/src/multimedia/effects/qsoundeffect_pulse_p.h index 247f8a3..247f8a3 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.h +++ b/src/multimedia/effects/qsoundeffect_pulse_p.h diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp index 48fb257..48fb257 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.h b/src/multimedia/effects/qsoundeffect_qmedia_p.h index 8267f79..8267f79 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.h +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.h diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/effects/qsoundeffect_qsound_p.cpp index 0292d26..df160a9 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/effects/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/qsoundeffect_qsound_p.h b/src/multimedia/effects/qsoundeffect_qsound_p.h index 45c0888..45c0888 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.h +++ b/src/multimedia/effects/qsoundeffect_qsound_p.h diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/effects/wavedecoder_p.cpp index b7d6101..b534ded 100644 --- a/src/multimedia/qml/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,22 +114,33 @@ 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<quint32>(header.wave.descriptor.size) > sizeof(WAVEHeader)) { + // Extended data available + quint16 extraFormatBytes; + source->peek((char*)&extraFormatBytes, sizeof(quint16)); + extraFormatBytes = qFromLittleEndian<quint16>(extraFormatBytes); + source->read(sizeof(quint16) + extraFormatBytes); // dump it all + } + + source->read((char*)&dataHeader, sizeof(DATAHeader)); + int bps = qFromLittleEndian<quint16>(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<quint32>(header.wave.sampleRate)); format.setSampleSize(bps); format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels)); - dataSize = qFromLittleEndian<quint32>(header.data.descriptor.size); + dataSize = qFromLittleEndian<quint32>(dataHeader.descriptor.size); haveFormat = true; connect(source, SIGNAL(readyRead()), SIGNAL(readyRead())); diff --git a/src/multimedia/qml/wavedecoder_p.h b/src/multimedia/effects/wavedecoder_p.h index 00aa14e..fa1f77e 100644 --- a/src/multimedia/qml/wavedecoder_p.h +++ b/src/multimedia/effects/wavedecoder_p.h @@ -116,7 +116,6 @@ private: { RIFFHeader riff; WAVEHeader wave; - DATAHeader data; }; bool haveFormat; 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/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 27bff02..9466cad 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -43,6 +43,7 @@ #include <QtCore/qmetaobject.h> #include <QtCore/qtimer.h> #include <QtCore/qpointer.h> +#include <QtCore/qdebug.h> #include <QtMultimedia/qmediaplayer.h> @@ -55,6 +56,7 @@ #include <QtMultimedia/qvideowidget.h> #include <QtMultimedia/qgraphicsvideoitem.h> +//#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() @@ -243,10 +259,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 +968,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/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/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 27922af..cf9f4b2 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -541,7 +541,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) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 3addea1..7bfcf27 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -40,49 +40,51 @@ ****************************************************************************/ #include <QtOpenGL/qgl.h> +#include <QtOpenGL/qglpixelbuffer.h> #include "qgl_p.h" #include "qgl_egl_p.h" +#include "qglpixelbuffer_p.h" + +#ifdef Q_WS_X11 +#include <QtGui/private/qpixmap_x11_p.h> +#endif 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 (deviceType == QInternal::Widget) - props.setValue(EGL_LEVEL, f.plane()); + if (glFormat.alpha()) { + int alphaSize = glFormat.alphaBufferSize(); + eglProperties.setValue(EGL_ALPHA_SIZE, alphaSize == -1 ? 1 : alphaSize); + } + + 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) { @@ -126,7 +128,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() @@ -158,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); } @@ -183,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() @@ -206,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<QPixmap*>(paintDevice)->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) { + QX11PixmapData* x11PixmapData = static_cast<QX11PixmapData*>(pmd); + return (EGLSurface)x11PixmapData->gl_surface; + } else +#endif + return eglSurface; + } + if (paintDevice->devType() == QInternal::Pbuffer) { + QGLPixelBuffer* pbuf = static_cast<QGLPixelBuffer*>(paintDevice); + return pbuf->d_func()->pbuf; + } + return EGL_NO_SURFACE; +} + void QGLWidget::setMouseTracking(bool enable) { QWidget::setMouseTracking(enable); diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h index c503724..6b65227 100644 --- a/src/opengl/qgl_egl_p.h +++ b/src/opengl/qgl_egl_p.h @@ -53,15 +53,15 @@ // We mean it. // -#include <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglcontext_p.h> +#include <QtGui/private/qeglproperties_p.h> 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); -void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device); QT_END_NAMESPACE diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ecd8b43..c142715 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -65,13 +65,7 @@ #include "qglpaintdevice_p.h" #ifdef QT_OPENGL_ES -QT_BEGIN_INCLUDE_NAMESPACE -#if defined(QT_OPENGL_ES_2) -#include <EGL/egl.h> -#else -#include <GLES/egl.h> -#endif -QT_END_INCLUDE_NAMESPACE +#include <QtGui/private/qegl_p.h> #endif QT_BEGIN_NAMESPACE @@ -356,6 +350,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_qws.cpp b/src/opengl/qgl_qws.cpp index fd17a27..f72f051 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<QImage *>(device)->format()); - else - props.setPixelFormat(glScreen->pixelFormat()); -} - static EGLSurface qt_egl_create_surface (QEglContext *context, QPaintDevice *device, const QEglProperties *properties = 0) @@ -201,8 +186,9 @@ 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); + qt_eglproperties_set_glformat(configProps, d->glFormat); + configProps.setDeviceType(devType); + 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 f81115c..3bf7f3a 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -54,7 +54,8 @@ #include <windows.h> -#include <private/qegl_p.h> +#include <private/qeglproperties_p.h> +#include <private/qeglcontext_p.h> #include <private/qgl_egl_p.h> #include <private/qgl_cl_p.h> @@ -121,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<QImage *>(device)->format()); - else - props.setPixelFormat(QImage::Format_RGB16); -} - - static bool opengl32dll = false; bool QGLFormat::hasOpenGLOverlays() @@ -158,8 +149,9 @@ 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); + qt_eglproperties_set_glformat(configProps, d->glFormat); + configProps.setDeviceType(devType); + 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 3d183ee..123bbdd 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -48,14 +48,12 @@ #include "qgl_egl_p.h" #include "qcolormap.h" #include <QDebug> +#include <QPixmap> QT_BEGIN_NAMESPACE -bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, - const QX11Info &x11Info, bool useArgbVisual); - /* QGLTemporaryContext implementation */ @@ -79,12 +77,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; @@ -107,15 +100,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."); @@ -170,12 +155,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<QImage *>(device)->format()); -} - // Chooses the EGL config and creates the EGL context bool QGLContext::chooseContext(const QGLContext* shareContext) { @@ -186,54 +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<QPixmap*>(device())->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) + x11PixmapData = static_cast<QX11PixmapData*>(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<QWidget*>(device()); + if (widget->testAttribute(Qt::WA_TranslucentBackground)) + d->glFormat.setAlpha(true); + } + // 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.setDeviceType(devType); 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; @@ -241,16 +219,34 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) d->sharing = d->eglContext->isSharing(); if (d->sharing && shareContext) const_cast<QGLContext *>(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 and stores it in QGLPixelBufferPrivate::pbuf + + 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; } @@ -281,142 +277,6 @@ void QGLWidget::updateOverlayGL() //handle overlay } -//#define QT_DEBUG_X11_VISUAL_SELECTION 1 - -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); @@ -434,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 @@ -461,63 +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(); - - XVisualInfo vi; - QEglContext *eglContext = d->glcx->d_func()->eglContext; - bool usingArgbVisual = qt_egl_setup_x11_visual(vi, eglContext->display(), eglContext->config(), - x11Info(), tryArgbVisual); - - 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) @@ -526,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"); } @@ -609,11 +400,11 @@ 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" ) - << "config (" << int(*targetConfig) << ") to create a pixmap surface:"; + << "config to create a pixmap surface:"; // QEglProperties configProps(*targetConfig); // qDebug() << configProps.toString(); @@ -648,15 +439,14 @@ 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()); // qDebug("qt_createEGLSurfaceForPixmap() created surface 0x%x for pixmap 0x%x", // pixmapSurface, pixmapData->handle()); if (pixmapSurface == EGL_NO_SURFACE) { - qWarning() << "Failed to create a pixmap surface using config" << (int)pixmapConfig - << ":" << QEglContext::errorString(eglGetError()); + qWarning() << "Failed to create a pixmap surface:" << QEgl::errorString(); return false; } @@ -693,8 +483,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; @@ -717,8 +507,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; } @@ -734,7 +529,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 +552,10 @@ void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd) QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(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 +567,12 @@ void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd) QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(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.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 diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp index 954049d..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 @@ -137,7 +138,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,11 +205,12 @@ 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; - 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; diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index 6a1d030..811e554 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -44,6 +44,7 @@ #include <private/qgl_p.h> #include <private/qegl_p.h> #include <private/qeglproperties_p.h> +#include <private/qeglcontext_p.h> #if !defined(QT_OPENGL_ES_1) #include <private/qpaintengineex_opengl2_p.h> @@ -96,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); } @@ -114,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; } @@ -134,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); } @@ -167,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; diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 4ac4a3a..ca88de3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -83,7 +83,7 @@ #endif #ifdef QT_OPENGL_ES -#include <private/qegl_p.h> +#include <private/qeglcontext_p.h> #endif QT_BEGIN_NAMESPACE @@ -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<int>(ctxpriv->eglContext->config())); -#endif - widgetPrivate->extraData()->glContext = ctx; union { QGLContext **ctxPtr; void **voidPtr; }; 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 <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglcontext_p.h> #include "qwindowsurface_vgegl_p.h" #endif #include <QtCore/qvarlengtharray.h> 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 <QtGui/qimage.h> #if !defined(QT_NO_EGL) -#include <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglcontext_p.h> #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 <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglcontext_p.h> #include <QtGui/private/qwidget_p.h> 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 <QtGui/private/qegl_p.h> +#include <QtGui/private/qeglcontext_p.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index 5870b01..ec7d92b 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]; @@ -201,7 +201,6 @@ void QCoreWlanEngine::connectToId(const QString &id) return; } } - [apNetwork release]; } } } @@ -291,7 +290,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; @@ -318,20 +317,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); } } @@ -493,12 +478,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); 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..392a7a8 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), @@ -92,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 @@ -109,12 +109,14 @@ 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)); } } void QGstreamerPlayerSession::load(const QUrl &url) { m_url = url; + if (m_playbin) { m_tags.clear(); emit tagsChanged(); @@ -259,26 +261,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,31 +304,45 @@ 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) { - 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; - - g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL); + if (m_muted != muted) { + m_muted = muted; - 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, @@ -388,14 +414,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 +458,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 +477,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 +523,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 +552,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 +566,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 +638,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 +682,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; 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<QGstreamerMessage>(); /*! - \class gstreamer::QGstreamerMessage + \class QGstreamerMessage \internal */ 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 diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 418fd81..730fdc5 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -12,6 +12,5 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio mediaservices -contains(QT_CONFIG, declarative): SUBDIRS *= qdeclarativemodules diff --git a/src/plugins/qdeclarativemodules/multimedia/multimedia.pro b/src/plugins/qdeclarativemodules/multimedia/multimedia.pro deleted file mode 100644 index d8ad18e..0000000 --- a/src/plugins/qdeclarativemodules/multimedia/multimedia.pro +++ /dev/null @@ -1,15 +0,0 @@ -TARGET = multimedia -include(../../qpluginbase.pri) - -QT += multimedia declarative - -SOURCES += multimedia.cpp - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/Qt/multimedia -target.path = $$[QT_INSTALL_IMPORTS]/Qt/multimedia - -qmldir.files += $$QT_BUILD_TREE/imports/Qt/multimedia/qmldir -qmldir.path += $$[QT_INSTALL_IMPORTS]/Qt/multimedia - -INSTALLS += target qmldir - diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 9cd5c63..024b4d0 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1591,7 +1591,9 @@ QRegExp QScriptEnginePrivate::toRegExp(JSC::ExecState *exec, JSC::JSValue value) QVariant QScriptEnginePrivate::toVariant(JSC::ExecState *exec, JSC::JSValue value) { - if (isObject(value)) { + if (!value) { + return QVariant(); + } else if (isObject(value)) { if (isVariant(value)) return variantValue(value); #ifndef QT_NO_QOBJECT @@ -2901,6 +2903,9 @@ JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const result = eng->newQObject(*reinterpret_cast<QObject* const *>(ptr)); break; #endif + case QMetaType::QVariant: + result = jscValueFromVariant(exec, *reinterpret_cast<const QVariant*>(ptr)); + break; default: if (type == qMetaTypeId<QScriptValue>()) { result = eng->scriptValueToJSCValue(*reinterpret_cast<const QScriptValue*>(ptr)); @@ -2922,8 +2927,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<const QVariant*>(ptr)); if (typeName.endsWith('*') && !*reinterpret_cast<void* const *>(ptr)) return JSC::jsNull(); else @@ -3046,6 +3049,9 @@ bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value *reinterpret_cast<QVariantMap *>(ptr) = variantMapFromObject(exec, value); return true; } break; + case QMetaType::QVariant: + *reinterpret_cast<QVariant*>(ptr) = toVariant(exec, value); + return true; default: ; } @@ -3096,9 +3102,6 @@ bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value return false; *reinterpret_cast<QScriptValue*>(ptr) = eng->scriptValueFromJSCValue(value); return true; - } else if (name == "QVariant") { - *reinterpret_cast<QVariant*>(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 8d111f9..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)); } } @@ -2174,14 +2165,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<QVariant*>(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<QVariant*>(arg)); } else { actual = QScriptEnginePrivate::create(exec, argType, arg); } diff --git a/src/src.pro b/src/src.pro index 2b9dc30..8c21ef7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -29,6 +29,7 @@ contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia SRC_SUBDIRS += src_plugins +contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_imports src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main src_s60main.target = sub-s60main @@ -70,6 +71,8 @@ src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt src_activeqt.target = sub-activeqt src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins src_plugins.target = sub-plugins +src_imports.subdir = $$QT_SOURCE_TREE/src/imports +src_imports.target = sub-imports src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib src_testlib.target = sub-testlib src_javascriptcore.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore @@ -103,11 +106,13 @@ src_declarative.target = sub-declarative src_tools_activeqt.depends = src_tools_idc src_gui src_declarative.depends = src_xml src_gui src_script src_network src_svg src_plugins.depends = src_gui src_sql src_svg src_multimedia + src_imports.depends = src_gui src_declarative contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network src_xml contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon contains(QT_CONFIG, xmlpatterns): src_webkit.depends += src_xmlpatterns contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit + src_imports.depends += webkit #exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore } contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support @@ -116,7 +121,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/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/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/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 42ff523..99a32d9 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -7,6 +7,7 @@ SUBDIRS += \ qdeclarativeanimations \ # Cover qdeclarativebehaviors \ # Cover qdeclarativebinding \ # Cover + qdeclarativecomponent \ # Cover qdeclarativeconnection \ # Cover qdeclarativecontext \ # Cover qdeclarativedatetimeformatter \ # Cover @@ -55,6 +56,8 @@ SUBDIRS += \ qdeclarativexmllistmodel \ # Cover qpacketprotocol \ # Cover qdeclarativerepeater \ # Cover + qdeclarativeworkerscript \ # Cover + qdeclarativeworkerlistmodel \ # Cover qdeclarativevaluetypes \ # Cover qdeclarativexmlhttprequest \ # Cover qdeclarativeimageprovider \ # Cover diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro index b9bcd28..85d2a73 100644 --- a/tests/auto/declarative/examples/examples.pro +++ b/tests/auto/declarative/examples/examples.pro @@ -3,3 +3,5 @@ contains(QT_CONFIG,declarative): QT += declarative macx:CONFIG -= app_bundle SOURCES += tst_examples.cpp + +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 6160e7c..678dd59 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -168,10 +168,12 @@ void tst_examples::examples_data() QString examples = QLibraryInfo::location(QLibraryInfo::ExamplesPath); QString demos = QLibraryInfo::location(QLibraryInfo::DemosPath); + QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/"; QStringList files; files << findQmlFiles(QDir(examples)); files << findQmlFiles(QDir(demos)); + files << findQmlFiles(QDir(snippets)); foreach (const QString &file, files) QTest::newRow(file.toLatin1().constData()) << file; @@ -190,7 +192,6 @@ void tst_examples::examples() << "-scriptopts" << "play,testerror,exitoncomplete,exitonfailure" << file; QProcess p; -qDebug() << qmlruntime << arguments; p.start(qmlruntime, arguments); QVERIFY(p.waitForFinished()); QCOMPARE(p.exitStatus(), QProcess::NormalExit); diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml index 6381df3..2629cf4 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml @@ -7,6 +7,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: PropertyAnimation { from: "blue"; to: "green"; } + PropertyAnimation on x { from: "blue"; to: "green"; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml index 8d57e41..1543a2a 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml @@ -7,6 +7,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { from: "blue"; to: "green"; } + NumberAnimation on x { from: "blue"; to: "green"; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml index c4867c3..aa98c33 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml @@ -5,7 +5,7 @@ Rectangle { height: 320 Rectangle { color: "red" - color: ColorAnimation { from: 10; to: 15; } + ColorAnimation on color { from: 10; to: 15; } width: 50; height: 50 x: 100; y: 100 } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml index d9660b6..3f00e68 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml @@ -9,7 +9,7 @@ Rectangle { id: redRect width: 100; height: 100 color: Qt.rgba(1,0,0) - x: Behavior { + Behavior on x { NumberAnimation { objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true} } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml index 36417db..efed058 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml @@ -9,7 +9,7 @@ Rectangle { id: redRect width: 100; height: 100 color: Qt.rgba(1,0,0) - x: SequentialAnimation { + SequentialAnimation on x { running: false NumberAnimation { objectName: "MyAnim"; running: true } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml index 7e73f57..4437815 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/properties.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { to: 200 } + NumberAnimation on x { to: 200 } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml index 6c96155..b1f2020 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { targets: theRect; properties: "x"; to: 200; } + NumberAnimation on x { targets: theRect; properties: "x"; to: 200; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml index ff08885..0a0ed6f 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { target: theRect; property: "x"; to: 300; } + NumberAnimation on x { target: theRect; property: "x"; to: 300; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml index dab7e5f..a90f004 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { target: theRect; property: "y"; to: 200; } + NumberAnimation on x { target: theRect; property: "y"; to: 200; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml index 38396b1..7d3cec9 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { targets: theRect; properties: "y"; to: 200; } + NumberAnimation on x { targets: theRect; properties: "y"; to: 200; } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml index c35063d..2260440 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { id: anim; objectName: "MyAnim"; to: 200 } + NumberAnimation on x { id: anim; objectName: "MyAnim"; to: 200 } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml index 1a60542..36d6c72 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml @@ -9,6 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - x: NumberAnimation { id: anim; objectName: "MyAnim"; running: false; to: 200 } + NumberAnimation on x { id: anim; objectName: "MyAnim"; running: false; to: 200 } } } diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index 53c63b5..f5e15fb 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -217,21 +217,21 @@ void tst_qdeclarativeanimations::resume() animation.setProperty("x"); animation.setFrom(10); animation.setTo(200); - animation.setDuration(500); + animation.setDuration(1000); QVERIFY(animation.from() == 10); animation.start(); - QTest::qWait(100); + QTest::qWait(400); animation.pause(); qreal x = rect.x(); - QVERIFY(x != qreal(200)); + QVERIFY(x != qreal(200) && x != qreal(10)); QVERIFY(animation.isRunning()); QVERIFY(animation.isPaused()); animation.resume(); QVERIFY(animation.isRunning()); QVERIFY(!animation.isPaused()); - QTest::qWait(100); + QTest::qWait(400); animation.stop(); QVERIFY(rect.x() > x); } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml index 201da37..e982f21 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml @@ -9,7 +9,7 @@ Rectangle { objectName: "MyRect" width: 100; height: 100; color: "green" x: basex - x: Behavior { NumberAnimation { duration: 500; } } + Behavior on x { NumberAnimation { duration: 500; } } } MouseArea { id: clicker diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml index 91dbbd1..f2f4742 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml @@ -7,7 +7,7 @@ Rectangle { objectName: "MyRect" width: 100; height: 100; color: "green" - color: Behavior { ColorAnimation { duration: 500; } } + Behavior on color { ColorAnimation { duration: 500; } } } MouseArea { id: clicker diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml index 8d032f0..3ea9376 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml @@ -6,6 +6,6 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { NumberAnimation { duration: 500; } } + Behavior on x { NumberAnimation { duration: 500; } } } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml index 3c7078a..1403eb9 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { + Behavior on x { objectName: "MyBehavior"; enabled: false NumberAnimation { duration: 200; } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml index ba7cc9c..12b1b7b 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml @@ -9,7 +9,7 @@ Rectangle { id: redRect width: 100; height: 100 color: Qt.rgba(1,0,0) - x: Behavior { + Behavior on x { NumberAnimation { objectName: "MyAnim"; running: true } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml index 95d934a..5e30f03 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior {} + Behavior on x {} } MouseArea { id: clicker diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml index 1b2025a..ca0ea54 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { + Behavior on x { objectName: "MyBehavior"; NumberAnimation { target: rect; property: "x"; duration: 500; } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml index 14883d4..a6c4ed9 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - pos: Behavior { PropertyAnimation { duration: 500; } } + Behavior on pos { PropertyAnimation { duration: 500; } } } MouseArea { id: clicker diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml index b43ddbc..2dda220 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - pos.x: Behavior { NumberAnimation { duration: 500; } } + Behavior on pos.x { NumberAnimation { duration: 500; } } } MouseArea { id: clicker diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml index 5f2c057..6187768 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { NumberAnimation { duration: 200; } } + Behavior on x { NumberAnimation { duration: 200; } } onXChanged: x = 100; } states: State { diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml index f267a05..640a7d1 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { + Behavior on x { objectName: "MyBehavior"; NumberAnimation { targets: rect; properties: "y"; duration: 200; } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml index 7c7fdcb..3860ec7 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - parent: Behavior { + Behavior on parent { SequentialAnimation { PauseAnimation { duration: 500 } PropertyAction {} diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml index ba744b1..6419a6b 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { + Behavior on x { objectName: "MyBehavior" NumberAnimation { duration: 200 } NumberAnimation { duration: 1000 } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml index a91ca88..b22441a 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml @@ -11,6 +11,6 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { NumberAnimation { duration: 500; } } + Behavior on x { NumberAnimation { duration: 500; } } } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml index ac98ed0..c28fa9a 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml @@ -6,7 +6,7 @@ Rectangle { id: rect objectName: "MyRect" width: 100; height: 100; color: "green" - x: Behavior { + Behavior on x { objectName: "MyBehavior"; NumberAnimation { duration: 500; } } diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp index f87330d..0bf0b81 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp +++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp @@ -260,7 +260,7 @@ void tst_qdeclarativebehaviors::reassignedAnimation() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml")); - QTest::ignoreMessage(QtWarningMsg, QString("QML Behavior (" + QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:12) Cannot change the animation assigned to a Behavior.").toUtf8().constData()); + QTest::ignoreMessage(QtWarningMsg, QString("QML Behavior (" + QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9) Cannot change the animation assigned to a Behavior.").toUtf8().constData()); QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create()); QVERIFY(rect); QCOMPARE(qobject_cast<QDeclarativeNumberAnimation*>( diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro new file mode 100644 index 0000000..c7affb7 --- /dev/null +++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +QT += script network +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativecomponent.cpp + +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativewebview/testtypes.h b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index 8eb703f..c9e304c 100644 --- a/tests/auto/declarative/qdeclarativewebview/testtypes.h +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -38,29 +38,38 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef TESTTYPES_H -#define TESTTYPES_H +#include <qtest.h> -#include <private/qdeclarativewebview_p.h> +#include <QtDeclarative/qdeclarativeengine.h> +#include <QtDeclarative/qdeclarativecomponent.h> -class MyWebView : public QDeclarativeWebView +class tst_qdeclarativecomponent : public QObject { Q_OBJECT - Q_PROPERTY(int pixelsPainted READ pixelsPainted); - public: - MyWebView() : pp(0) {} - - int pixelsPainted() const { return pp; } + tst_qdeclarativecomponent() { } - void drawContents(QPainter *p, const QRect &r); +private slots: + void loadEmptyUrl(); private: - int pp; + QDeclarativeEngine engine; }; -QML_DECLARE_TYPE(MyWebView); +void tst_qdeclarativecomponent::loadEmptyUrl() +{ + QDeclarativeComponent c(&engine); + c.loadUrl(QUrl()); + + QVERIFY(c.isError()); + QCOMPARE(c.errors().count(), 1); + QDeclarativeError error = c.errors().first(); + QCOMPARE(error.url(), QUrl()); + QCOMPARE(error.line(), -1); + QCOMPARE(error.column(), -1); + QCOMPARE(error.description(), QLatin1String("Invalid empty URL")); +} -void registerTypes(); +QTEST_MAIN(tst_qdeclarativecomponent) -#endif // TESTTYPES_H +#include "tst_qdeclarativecomponent.moc" diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp index 5f03989..f0117f5 100644 --- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp +++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp @@ -60,6 +60,7 @@ private slots: void setContextProperty(); void addDefaultObject(); void destruction(); + void idAsContextProperty(); private: QDeclarativeEngine engine; @@ -429,6 +430,25 @@ void tst_qdeclarativecontext::destruction() QCOMPARE(ctxt, expr.context()); } +void tst_qdeclarativecontext::idAsContextProperty() +{ + QDeclarativeComponent component(&engine); + component.setData("import Qt 4.6; QtObject { property var a; a: QtObject { id: myObject } }", QUrl()); + + QObject *obj = component.create(); + QVERIFY(obj); + + QVariant a = obj->property("a"); + QVERIFY(a.userType() == QMetaType::QObjectStar); + + QVariant ctxt = qmlContext(obj)->contextProperty("myObject"); + QVERIFY(ctxt.userType() == QMetaType::QObjectStar); + + QVERIFY(a == ctxt); + + delete obj; +} + QTEST_MAIN(tst_qdeclarativecontext) #include "tst_qdeclarativecontext.moc" diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp index 9543280..6cd0bdb 100644 --- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp +++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp @@ -274,7 +274,7 @@ void tst_qdeclarativedom::loadComposite() void tst_qdeclarativedom::testValueSource() { QByteArray qml = "import Qt 4.6\n" - "Rectangle { height: SpringFollow { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; + "Rectangle { SpringFollow on height { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; QDeclarativeEngine freshEngine; QDeclarativeDomDocument document; @@ -306,7 +306,7 @@ void tst_qdeclarativedom::testValueSource() void tst_qdeclarativedom::testValueInterceptor() { QByteArray qml = "import Qt 4.6\n" - "Rectangle { height: Behavior { NumberAnimation { duration: 100 } } }"; + "Rectangle { Behavior on height { NumberAnimation { duration: 100 } } }"; QDeclarativeEngine freshEngine; QDeclarativeDomDocument document; @@ -823,8 +823,8 @@ void tst_qdeclarativedom::copy() " property int a: 10\n" " x: 10\n" " y: x + 10\n" - " z: NumberAnimation {}\n" - " opacity: Behavior {}\n" + " NumberAnimation on z {}\n" + " Behavior on opacity {}\n" " Component {\n" " Item{}\n" " }\n" @@ -1193,18 +1193,18 @@ void tst_qdeclarativedom::copy() void tst_qdeclarativedom::position() { QByteArray qml = "import Qt 4.6\n" - /*14*/ "Item {\n" - /*21*/ " id: myItem\n" - /*36*/ " property int a: 10\n" - /*59*/ " x: 10\n" - /*69*/ " y: x + 10\n" - /*83*/ " z: NumberAnimation {}\n" - /*109*/ " opacity: Behavior {}\n" - /*134*/ " Component {\n" - /*150*/ " Item{}\n" - /*165*/ " }\n" - /*171*/ " children: [ Item{}, Item{} ]\n" - /*204*/ "}\n"; + "Item {\n" + " id: myItem\n" + " property int a: 10\n" + " x: 10\n" + " y: x + 10\n" + " NumberAnimation on z {}\n" + " Behavior on opacity {}\n" + " Component {\n" + " Item{}\n" + " }\n" + " children: [ Item{}, Item{} ]\n" + "}\n"; QDeclarativeDomDocument document; @@ -1227,19 +1227,19 @@ void tst_qdeclarativedom::position() QCOMPARE(y.length(), 1); QDeclarativeDomProperty z = root.property("z"); - QCOMPARE(z.position(), 87); + QCOMPARE(z.position(), 106); QCOMPARE(z.length(), 1); QDeclarativeDomProperty opacity = root.property("opacity"); - QCOMPARE(opacity.position(), 113); + QCOMPARE(opacity.position(), 127); QCOMPARE(opacity.length(), 7); QDeclarativeDomProperty data = root.property("data"); - QCOMPARE(data.position(), 138); + QCOMPARE(data.position(), 142); QCOMPARE(data.length(), 0); QDeclarativeDomProperty children = root.property("children"); - QCOMPARE(children.position(), 175); + QCOMPARE(children.position(), 179); QCOMPARE(children.length(), 8); QDeclarativeDomList dataList = data.value().toList(); @@ -1249,30 +1249,30 @@ void tst_qdeclarativedom::position() // All QDeclarativeDomObject QCOMPARE(root.position(), 14); - QCOMPARE(root.length(), 191); + QCOMPARE(root.length(), 195); QDeclarativeDomObject numberAnimation = z.value().toValueSource().object(); - QCOMPARE(numberAnimation.position(), 90); - QCOMPARE(numberAnimation.length(), 18); + QCOMPARE(numberAnimation.position(), 87); + QCOMPARE(numberAnimation.length(), 23); QDeclarativeDomObject behavior = opacity.value().toValueInterceptor().object(); - QCOMPARE(behavior.position(), 122); - QCOMPARE(behavior.length(), 11); + QCOMPARE(behavior.position(), 115); + QCOMPARE(behavior.length(), 22); QDeclarativeDomObject component = dataList.values().at(0).toObject(); - QCOMPARE(component.position(), 138); + QCOMPARE(component.position(), 142); QCOMPARE(component.length(), 32); QDeclarativeDomObject componentRoot = component.toComponent().componentRoot(); - QCOMPARE(componentRoot.position(), 158); + QCOMPARE(componentRoot.position(), 162); QCOMPARE(componentRoot.length(), 6); QDeclarativeDomObject child1 = childrenList.values().at(0).toObject(); - QCOMPARE(child1.position(), 187); + QCOMPARE(child1.position(), 191); QCOMPARE(child1.length(), 6); QDeclarativeDomObject child2 = childrenList.values().at(1).toObject(); - QCOMPARE(child2.position(), 195); + QCOMPARE(child2.position(), 199); QCOMPARE(child2.length(), 6); // All QDeclarativeDomValue @@ -1285,23 +1285,23 @@ void tst_qdeclarativedom::position() QCOMPARE(yValue.length(), 6); QDeclarativeDomValue zValue = z.value(); - QCOMPARE(zValue.position(), 90); - QCOMPARE(zValue.length(), 18); + QCOMPARE(zValue.position(), 87); + QCOMPARE(zValue.length(), 23); QDeclarativeDomValue opacityValue = opacity.value(); - QCOMPARE(opacityValue.position(), 122); - QCOMPARE(opacityValue.length(), 11); + QCOMPARE(opacityValue.position(), 115); + QCOMPARE(opacityValue.length(), 22); QDeclarativeDomValue dataValue = data.value(); - QCOMPARE(dataValue.position(), 138); + QCOMPARE(dataValue.position(), 142); QCOMPARE(dataValue.length(), 32); QDeclarativeDomValue child1Value = childrenList.values().at(0); - QCOMPARE(child1Value.position(), 187); + QCOMPARE(child1Value.position(), 191); QCOMPARE(child1Value.length(), 6); QDeclarativeDomValue child2Value = childrenList.values().at(1); - QCOMPARE(child2Value.position(), 195); + QCOMPARE(child2Value.position(), 199); QCOMPARE(child2Value.length(), 6); // All QDeclarativeDomList diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml new file mode 100644 index 0000000..4b5464d --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml @@ -0,0 +1,9 @@ +import Qt 4.6 +import Qt.test 1.0 + +QtObject { + property int value: 9 + property int value2 + + MyQmlObject.onMySignal: value2 = value +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml index 3d45b15..5ba324a 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml @@ -1,7 +1,7 @@ import Qt 4.6 Item { - property alias x: item.x + property alias blah: item.x Item { id: item } function testFunction() { return 9; } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml new file mode 100644 index 0000000..4ad7f34 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml @@ -0,0 +1,13 @@ +import Qt 4.6 + +Item { + id: root + + property int foo: 12 + property int console: 11 + + property bool test1: foo == 12 + property bool test2: console != 11 + property bool test3: root.console == 11 +} + diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml new file mode 100644 index 0000000..d65b6e7 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml @@ -0,0 +1,12 @@ +import Qt.test 1.0 + +MyQmlObject { + id: a + property int b: 9 + + property int test + property string test2 + + // Should resolve to signal arguments, not to other elements in the file + onArgumentSignal: { test = a; test2 = b; } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml new file mode 100644 index 0000000..9b11fa9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml @@ -0,0 +1,13 @@ +import Qt.test 1.0 + +MyQmlObject { + property string result + + Script{ + function f() { + result = b + } + + } + onArgumentSignal: f() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml new file mode 100644 index 0000000..ec727e2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml @@ -0,0 +1,11 @@ +import Qt.test 1.0 + +MyQmlObject { + property string result + property string aProp: "hello" + + Script{ + source: "scriptScope.js" + } + onBasicSignal: f() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js new file mode 100644 index 0000000..5689930 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js @@ -0,0 +1,5 @@ +var aProp = "world"; + +function f() { + result = aProp; +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 8fbd071..a283e3f 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -60,10 +60,21 @@ class MyQmlAttachedObject : public QObject { Q_OBJECT Q_PROPERTY(int value READ value CONSTANT) + Q_PROPERTY(int value2 READ value2 WRITE setValue2) public: - MyQmlAttachedObject(QObject *parent) : QObject(parent) {} + MyQmlAttachedObject(QObject *parent) : QObject(parent), m_value2(0) {} int value() const { return 19; } + int value2() const { return m_value2; } + void setValue2(int v) { m_value2 = v; } + + void emitMySignal() { emit mySignal(); } + +signals: + void mySignal(); + +private: + int m_value2; }; class MyQmlObject : public QObject diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 60c380c..b5649cb 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -122,6 +122,8 @@ private slots: void listToVariant(); void multiEngineObject(); void deletedObject(); + void scriptScope(); + void attachedPropertyScope(); void bug1(); @@ -728,6 +730,33 @@ void tst_qdeclarativeecmascript::scope() QCOMPARE(object->property("test5").toInt(), 24); QCOMPARE(object->property("test6").toInt(), 24); } + + { + QDeclarativeComponent component(&engine, TEST_FILE("scope.3.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("test1").toBool(), true); + QCOMPARE(object->property("test2").toBool(), true); + QCOMPARE(object->property("test3").toBool(), true); + } + + // Signal argument scope + { + QDeclarativeComponent component(&engine, TEST_FILE("scope.4.qml")); + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->property("test").toInt(), 0); + QCOMPARE(object->property("test2").toString(), QString()); + + emit object->argumentSignal(13, "Argument Scope", 9); + + QCOMPARE(object->property("test").toInt(), 13); + QCOMPARE(object->property("test2").toString(), QString("Argument Scope")); + + delete object; + } } /* @@ -1657,6 +1686,51 @@ void tst_qdeclarativeecmascript::deletedObject() delete object; } +void tst_qdeclarativeecmascript::scriptScope() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.1.qml")); + + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + emit object->argumentSignal(19, "Hello world!", 10.3); + QCOMPARE(object->property("result").toString(), QString()); + + delete object; + } + + { + QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.2.qml")); + + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + emit object->basicSignal(); + QCOMPARE(object->property("result").toString(), QLatin1String("world")); + + delete object; + } +} + +void tst_qdeclarativeecmascript::attachedPropertyScope() +{ + QDeclarativeComponent component(&engine, TEST_FILE("attachedPropertyScope.qml")); + + QObject *object = component.create(); + QVERIFY(object != 0); + + MyQmlAttachedObject *attached = + qobject_cast<MyQmlAttachedObject *>(qmlAttachedPropertiesObject<MyQmlObject>(object)); + QVERIFY(attached != 0); + + QCOMPARE(object->property("value2").toInt(), 0); + + attached->emitMySignal(); + + QCOMPARE(object->property("value2").toInt(), 9); + + delete object; +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview.qml index 344b4b5..ba6b807 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview.qml @@ -1,6 +1,10 @@ import Qt 4.6 Rectangle { + id: root + property int added: -1 + property var removed + width: 240 height: 320 color: "#ffffff" @@ -33,6 +37,8 @@ Rectangle { text: number } color: GridView.isCurrentItem ? "lightsteelblue" : "white" + GridView.onAdd: root.added = index + GridView.onRemove: root.removed = name } } ] diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml new file mode 100644 index 0000000..da2e8d0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml @@ -0,0 +1,69 @@ +import Qt 4.6 + +Rectangle { + width: 360; height: 120; color: "white" + Component { + id: delegate + Item { + id: wrapper + width: 180; height: 40; + Column { + x: 5; y: 5 + Text { text: '<b>Name:</b> ' + name } + Text { text: '<b>Number:</b> ' + number } + } + } + } + Component { + id: highlightRed + Rectangle { + color: "red" + radius: 10 + opacity: 0.5 + } + } + GridView { + cellWidth:180 + cellHeight:40 + objectName: "gridView" + anchors.fill: parent + model: listModel + delegate: delegate + highlight: highlightRed + focus: true + keyNavigationWraps: true + cacheBuffer: 10 + flow: GridView.LeftToRight + } + + data:[ + ListModel { + id: listModel + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + }, + ListModel { + objectName: "alternateModel" + ListElement { + name: "Jack" + number: "555 8426" + } + ListElement { + name: "Mary" + number: "555 3264" + } + } + ] +} + +
\ No newline at end of file diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 2a60fee..7ade309 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -39,16 +39,17 @@ ** ****************************************************************************/ -#include <qdeclarativeengine.h> -#include <qdeclarativecomponent.h> -#include <QStringListModel> #include <QtTest/QtTest> -#include <private/qlistmodelinterface_p.h> -#include <qdeclarativeview.h> -#include <private/qdeclarativegridview_p.h> -#include <private/qdeclarativetext_p.h> -#include <qdeclarativecontext.h> -#include <qdeclarativeexpression.h> +#include <QtGui/qstringlistmodel.h> +#include <QtDeclarative/qdeclarativeview.h> +#include <QtDeclarative/qdeclarativeengine.h> +#include <QtDeclarative/qdeclarativecomponent.h> +#include <QtDeclarative/qdeclarativecontext.h> +#include <QtDeclarative/qdeclarativeexpression.h> +#include <QtDeclarative/private/qlistmodelinterface_p.h> +#include <QtDeclarative/private/qdeclarativegridview_p.h> +#include <QtDeclarative/private/qdeclarativetext_p.h> +#include <QtDeclarative/private/qdeclarativelistmodel_p.h> class tst_QDeclarativeGridView : public QObject { @@ -66,6 +67,9 @@ private slots: void currentIndex(); void defaultValues(); void properties(); + void propertyChanges(); + void componentChanges(); + void modelChanges(); void positionViewAtIndex(); void resetModel(); void QTBUG_8456(); @@ -91,7 +95,7 @@ public: setRoleNames(roles); } - int rowCount(const QModelIndex &parent=QModelIndex()) const { return list.count(); } + int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); } QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const { QVariant rv; if (role == Name) @@ -253,7 +257,7 @@ void tst_QDeclarativeGridView::inserted() model.insertItem(1, "Will", "9876"); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item @@ -264,6 +268,10 @@ void tst_QDeclarativeGridView::inserted() QVERIFY(number != 0); QCOMPARE(number->text(), model.number(1)); + // Checks that onAdd is called + int added = canvas->rootObject()->property("added").toInt(); + QCOMPARE(added, 1); + // Confirm items positioned correctly for (int i = 0; i < model.count(); ++i) { QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i); @@ -274,7 +282,7 @@ void tst_QDeclarativeGridView::inserted() model.insertItem(0, "Foo", "1111"); // zero index, and current item // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item @@ -296,14 +304,14 @@ void tst_QDeclarativeGridView::inserted() for (int i = model.count(); i < 30; ++i) model.insertItem(i, "Hello", QString::number(i)); - QTest::qWait(300); + QTest::qWait(100); gridview->setContentY(120); - QTest::qWait(300); + QTest::qWait(100); // Insert item outside visible area model.insertItem(1, "Hello", "1324"); - QTest::qWait(300); + QTest::qWait(100); QVERIFY(gridview->contentY() == 120); @@ -334,7 +342,7 @@ void tst_QDeclarativeGridView::removed() model.removeItem(1); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1); QVERIFY(name != 0); @@ -343,6 +351,10 @@ void tst_QDeclarativeGridView::removed() QVERIFY(number != 0); QCOMPARE(number->text(), model.number(1)); + // Checks that onRemove is called + QString removed = canvas->rootObject()->property("removed").toString(); + QCOMPARE(removed, QString("Item1")); + // Confirm items positioned correctly int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { @@ -357,7 +369,7 @@ void tst_QDeclarativeGridView::removed() model.removeItem(0); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); name = findItem<QDeclarativeText>(viewport, "textName", 0); QVERIFY(name != 0); @@ -379,7 +391,7 @@ void tst_QDeclarativeGridView::removed() // Remove items not visible model.removeItem(25); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Confirm items positioned correctly itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count(); @@ -393,11 +405,11 @@ void tst_QDeclarativeGridView::removed() // Remove items before visible gridview->setContentY(120); - QTest::qWait(500); + QTest::qWait(100); gridview->setCurrentIndex(10); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Setting currentIndex above shouldn't cause view to scroll QCOMPARE(gridview->contentY(), 120.0); @@ -405,7 +417,7 @@ void tst_QDeclarativeGridView::removed() model.removeItem(1); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Confirm items positioned correctly for (int i = 6; i < 18; ++i) { @@ -419,14 +431,14 @@ void tst_QDeclarativeGridView::removed() // Remove currentIndex QDeclarativeItem *oldCurrent = gridview->currentItem(); model.removeItem(9); - QTest::qWait(500); + QTest::qWait(100); QCOMPARE(gridview->currentIndex(), 9); QVERIFY(gridview->currentItem() != oldCurrent); gridview->setContentY(0); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Confirm items positioned correctly itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count(); @@ -440,7 +452,7 @@ void tst_QDeclarativeGridView::removed() // remove item outside current view. gridview->setCurrentIndex(32); - QTest::qWait(500); + QTest::qWait(100); gridview->setContentY(240); model.removeItem(30); @@ -448,21 +460,21 @@ void tst_QDeclarativeGridView::removed() // remove current item beyond visible items. gridview->setCurrentIndex(20); - QTest::qWait(500); + QTest::qWait(100); gridview->setContentY(0); model.removeItem(20); - QTest::qWait(500); + QTest::qWait(100); QCOMPARE(gridview->currentIndex(), 20); QVERIFY(gridview->currentItem() != 0); // remove item before current, but visible gridview->setCurrentIndex(8); - QTest::qWait(500); + QTest::qWait(100); gridview->setContentY(240); oldCurrent = gridview->currentItem(); model.removeItem(6); - QTest::qWait(500); + QTest::qWait(100); QCOMPARE(gridview->currentIndex(), 7); QVERIFY(gridview->currentItem() == oldCurrent); @@ -494,7 +506,7 @@ void tst_QDeclarativeGridView::moved() model.moveItem(1, 8); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1); QVERIFY(name != 0); @@ -526,7 +538,7 @@ void tst_QDeclarativeGridView::moved() model.moveItem(1, 25); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Confirm items positioned correctly and indexes correct itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count()-1; @@ -548,7 +560,7 @@ void tst_QDeclarativeGridView::moved() model.moveItem(28, 8); // let transitions settle. - QTest::qWait(300); + QTest::qWait(100); // Confirm items positioned correctly and indexes correct for (int i = 6; i < model.count()-6 && i < itemCount+6; ++i) { @@ -591,7 +603,7 @@ void tst_QDeclarativeGridView::currentIndex() QDeclarativeItem *viewport = gridview->viewport(); QVERIFY(viewport != 0); - QTest::qWait(500); + QTest::qWait(300); // current item should be third item QCOMPARE(gridview->currentIndex(), 5); @@ -618,7 +630,7 @@ void tst_QDeclarativeGridView::currentIndex() QCOMPARE(gridview->currentIndex(), 0); gridview->setCurrentIndex(model.count()-1); - QTest::qWait(500); + QTest::qWait(100); QCOMPARE(gridview->currentIndex(), model.count()-1); gridview->moveCurrentIndexRight(); @@ -677,8 +689,6 @@ void tst_QDeclarativeGridView::currentIndex() // turn off auto highlight gridview->setHighlightFollowsCurrentItem(false); QVERIFY(gridview->highlightFollowsCurrentItem() == false); - - QTest::qWait(500); QVERIFY(gridview->highlightItem()); qreal hlPosX = gridview->highlightItem()->x(); qreal hlPosY = gridview->highlightItem()->y(); @@ -729,7 +739,7 @@ void tst_QDeclarativeGridView::changeFlow() } ctxt->setContextProperty("testTopToBottom", QVariant(true)); - QTest::qWait(500); + QTest::qWait(100); // Confirm items positioned correctly and indexes correct itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count(); @@ -796,6 +806,107 @@ void tst_QDeclarativeGridView::properties() delete obj; } +void tst_QDeclarativeGridView::propertyChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView"); + QVERIFY(gridView); + + QSignalSpy keyNavigationWrapsSpy(gridView, SIGNAL(keyNavigationWrapsChanged())); + QSignalSpy cacheBufferSpy(gridView, SIGNAL(cacheBufferChanged())); + QSignalSpy flowSpy(gridView, SIGNAL(flowChanged())); + + QCOMPARE(gridView->isWrapEnabled(), true); + QCOMPARE(gridView->cacheBuffer(), 10); + QCOMPARE(gridView->flow(), QDeclarativeGridView::LeftToRight); + + gridView->setWrapEnabled(false); + gridView->setCacheBuffer(3); + gridView->setFlow(QDeclarativeGridView::TopToBottom); + + QCOMPARE(gridView->isWrapEnabled(), false); + QCOMPARE(gridView->cacheBuffer(), 3); + QCOMPARE(gridView->flow(), QDeclarativeGridView::TopToBottom); + + QCOMPARE(keyNavigationWrapsSpy.count(),1); + QCOMPARE(cacheBufferSpy.count(),1); + QCOMPARE(flowSpy.count(),1); + + gridView->setWrapEnabled(false); + gridView->setCacheBuffer(3); + gridView->setFlow(QDeclarativeGridView::TopToBottom); + + QCOMPARE(keyNavigationWrapsSpy.count(),1); + QCOMPARE(cacheBufferSpy.count(),1); + QCOMPARE(flowSpy.count(),1); + + delete canvas; +} + +void tst_QDeclarativeGridView::componentChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView"); + QVERIFY(gridView); + + QDeclarativeComponent component(canvas->engine()); + component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); + + QDeclarativeComponent delegateComponent(canvas->engine()); + delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile("")); + + QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged())); + QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged())); + + gridView->setHighlight(&component); + gridView->setDelegate(&delegateComponent); + + QCOMPARE(gridView->highlight(), &component); + QCOMPARE(gridView->delegate(), &delegateComponent); + + QCOMPARE(highlightSpy.count(),1); + QCOMPARE(delegateSpy.count(),1); + + gridView->setHighlight(&component); + gridView->setDelegate(&delegateComponent); + + QCOMPARE(highlightSpy.count(),1); + QCOMPARE(delegateSpy.count(),1); + delete canvas; +} + +void tst_QDeclarativeGridView::modelChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView"); + QVERIFY(gridView); + + QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel"); + QVERIFY(alternateModel); + QVariant modelVariant = QVariant::fromValue(alternateModel); + QSignalSpy modelSpy(gridView, SIGNAL(modelChanged())); + + gridView->setModel(modelVariant); + QCOMPARE(gridView->model(), modelVariant); + QCOMPARE(modelSpy.count(),1); + + gridView->setModel(modelVariant); + QCOMPARE(modelSpy.count(),1); + + gridView->setModel(QVariant()); + QCOMPARE(modelSpy.count(),2); + delete canvas; +} + void tst_QDeclarativeGridView::positionViewAtIndex() { QDeclarativeView *canvas = createView(); diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml index 9281a17..08da901 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml @@ -11,6 +11,8 @@ Grid { color: focus ? "red" : "lightgray" KeyNavigation.right: item2 KeyNavigation.down: item3 + KeyNavigation.tab: item2 + KeyNavigation.backtab: item4 } Rectangle { id: item2 @@ -19,6 +21,8 @@ Grid { color: focus ? "red" : "lightgray" KeyNavigation.left: item1 KeyNavigation.down: item4 + KeyNavigation.tab: item3 + KeyNavigation.backtab: item1 } Rectangle { id: item3 @@ -27,6 +31,8 @@ Grid { color: focus ? "red" : "lightgray" KeyNavigation.right: item4 KeyNavigation.up: item1 + KeyNavigation.tab: item4 + KeyNavigation.backtab: item2 } Rectangle { id: item4 @@ -35,5 +41,7 @@ Grid { color: focus ? "red" : "lightgray" KeyNavigation.left: item3 KeyNavigation.up: item2 + KeyNavigation.tab: item1 + KeyNavigation.backtab: item3 } } diff --git a/tests/auto/declarative/qdeclarativeitem/data/keys.qml b/tests/auto/declarative/qdeclarativeitem/data/keys.qml index f3c1f7b..7d34fc8 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keys.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keys.qml @@ -7,6 +7,8 @@ Item { Keys.onReturnPressed: keysTestObject.keyPress(event.key, "Return", event.modifiers) Keys.onDigit0Pressed: keysTestObject.keyPress(event.key, event.text, event.modifiers) Keys.onDigit9Pressed: { event.accepted = false; keysTestObject.keyPress(event.key, event.text, event.modifiers) } + Keys.onTabPressed: keysTestObject.keyPress(event.key, "Tab", event.modifiers) + Keys.onBacktabPressed: keysTestObject.keyPress(event.key, "Backtab", event.modifiers) Keys.forwardTo: [ item2 ] Keys.enabled: enableKeyHanding diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 36dcf1f..dbcba16 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -176,6 +176,26 @@ void tst_QDeclarativeItem::keys() testObject->reset(); + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QCOMPARE(testObject->mKey, int(Qt::Key_Tab)); + QCOMPARE(testObject->mForwardedKey, int(Qt::Key_Tab)); + QCOMPARE(testObject->mText, QLatin1String("Tab")); + QVERIFY(testObject->mModifiers == Qt::NoModifier); + QVERIFY(key.isAccepted()); + + testObject->reset(); + + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QCOMPARE(testObject->mKey, int(Qt::Key_Backtab)); + QCOMPARE(testObject->mForwardedKey, int(Qt::Key_Backtab)); + QCOMPARE(testObject->mText, QLatin1String("Backtab")); + QVERIFY(testObject->mModifiers == Qt::NoModifier); + QVERIFY(key.isAccepted()); + + testObject->reset(); + canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(false)); key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1); @@ -240,6 +260,24 @@ void tst_QDeclarativeItem::keyNavigation() item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasFocus()); + + // tab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem<QDeclarativeItem>(canvas->rootObject(), "item2"); + QVERIFY(item); + QVERIFY(item->hasFocus()); + + // backtab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasFocus()); } void tst_QDeclarativeItem::smooth() diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml index c86c96b..9fe0ded 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml @@ -10,8 +10,6 @@ MyTypeObject { floatProperty: 8.5 colorProperty: "red" dateProperty: "1982-11-25" - timeProperty: "11:11:31" - timeProperty: "11:11:32" timeProperty: "11:11:32" dateTimeProperty: "2009-05-12T13:22:01" pointProperty: "99,13" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt index 9a13142..450fc16 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt @@ -1 +1 @@ -6:9:Invalid component id specification +6:9:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml new file mode 100644 index 0000000..7cd6a83 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml @@ -0,0 +1,7 @@ +import Qt 4.6 + +QtObject { + property int on + + Component.onCompleted: on = 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt index 945d51b..32055f6 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt @@ -1 +1 @@ -7:9:Invalid value in grouped property +7:9:Cannot assign a value directly to a grouped property diff --git a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt index 2aea251..e1f7ec5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt @@ -1 +1 @@ -5:5:Incorrectly specified signal +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt new file mode 100644 index 0000000..1fcb1b6 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt @@ -0,0 +1 @@ +4:14:Cannot assign a value directly to a grouped property diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml new file mode 100644 index 0000000..41aa3e2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + grouped: "10x10" + grouped.value: 10 +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt index 8331725..e1f7ec5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt @@ -1 +1 @@ -5:18:Single property assignment expected +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt new file mode 100644 index 0000000..fa0da21 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt @@ -0,0 +1 @@ +5:19:Property has already been assigned a value diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml new file mode 100644 index 0000000..56fca9b --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + pointProperty: "10x10" + pointProperty.x: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt new file mode 100644 index 0000000..6d837a7 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt @@ -0,0 +1 @@ +5:20:Property has already been assigned a value diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml new file mode 100644 index 0000000..982ab26 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + pointProperty.x: 10 + pointProperty: "10x10" +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt index 56e3eeb..2c6b8bf 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt @@ -1,2 +1,2 @@ -3:5:"" is not a valid object id +3:9:Invalid empty ID diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt index cfe8756..c721fe9 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt @@ -1 +1 @@ -4:5:Invalid use of id property +4:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt index 160e8b5..7251de1 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt @@ -1 +1 @@ -3:5:"StartsWithUpperCase" is not a valid object id +3:9:IDs cannot start with an uppercase letter diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt new file mode 100644 index 0000000..e4fd1db --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt @@ -0,0 +1 @@ +3:9:ID illegally masks global JavaScript property diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml new file mode 100644 index 0000000..d4bc539 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: gc +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt new file mode 100644 index 0000000..b03ec6c --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt @@ -0,0 +1 @@ +3:9:IDs must contain only letters, numbers, and underscores diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml new file mode 100644 index 0000000..1ea615c --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: hello.world +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt new file mode 100644 index 0000000..c010e79 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt @@ -0,0 +1 @@ +3:9:IDs must start with a letter or underscore diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml new file mode 100644 index 0000000..57474b7 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: "3hello" +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt index 1ca678c..c010e79 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt @@ -1 +1 @@ -3:5:"1" is not a valid object id +3:9:IDs must start with a letter or underscore diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt index 8c7b7e9..c721fe9 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt @@ -1 +1 @@ -4:15:Can only assign one binding to lists +4:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml new file mode 100644 index 0000000..649c49e --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: 11 +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml new file mode 100644 index 0000000..bc21db9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + property int a: 10 + a: 11 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml new file mode 100644 index 0000000..abcd216 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: a + 10 +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml new file mode 100644 index 0000000..77eaba0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: a + 10 + intProperty: 10 +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml new file mode 100644 index 0000000..c16d04f --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: MyTypeObject {} +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml new file mode 100644 index 0000000..2980c5b --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyContainer { + children: MyContainer {} + children: MyContainer {} +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml new file mode 100644 index 0000000..492c720 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyContainer { + children: MyContainer {} + children: [ MyContainer {}, MyContainer {} ] +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml new file mode 100644 index 0000000..2a9c1d0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyContainer { + children: [ MyContainer {}, MyContainer {} ] + children: MyContainer {} +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt new file mode 100644 index 0000000..450fc16 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt @@ -0,0 +1 @@ +6:9:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml new file mode 100644 index 0000000..052437e --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyTypeObject { + grouped { + value: 10 + value: 11 + } +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt new file mode 100644 index 0000000..e1f7ec5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml new file mode 100644 index 0000000..e2e954f --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + grouped.value: 10 + grouped.value: 11 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml index 57a6070..e48526a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml @@ -1,5 +1,5 @@ import Test 1.0 MyTypeObject { - intProperty : MyCompositeValueSource {} + MyCompositeValueSource on intProperty {} } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml index ad71fcf..22aa682 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml @@ -1,4 +1,4 @@ import Test 1.0 MyTypeObject { - intProperty : MyPropertyValueSource {} + MyPropertyValueSource on intProperty {} } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt index b5bf1a8..450fc16 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt @@ -1 +1 @@ -6:9:Invalid Script source value +6:9:Property value set multiple times diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index 8ac7aa6..df93dc8 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 @@ -75,17 +78,20 @@ Q_DECLARE_METATYPE(MyCustomVariantType); class MyAttachedObject : public QObject { Q_OBJECT - Q_PROPERTY(int value READ value WRITE setValue) + Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(int value2 READ value2 WRITE setValue2) public: MyAttachedObject(QObject *parent) : QObject(parent), m_value(0), m_value2(0) {} int value() const { return m_value; } - void setValue(int v) { m_value = v; } + void setValue(int v) { if (m_value != v) { m_value = v; emit valueChanged(); } } int value2() const { return m_value2; } void setValue2(int v) { m_value2 = v; } +signals: + void valueChanged(); + private: int m_value; int m_value2; @@ -166,11 +172,16 @@ class MyGroupedObject : public QObject { Q_OBJECT Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript); + Q_PROPERTY(int value READ value WRITE setValue); public: QDeclarativeScriptString script() const { return m_script; } void setScript(const QDeclarativeScriptString &s) { m_script = s; } + int value() const { return m_value; } + void setValue(int v) { m_value = v; } + private: + int m_value; QDeclarativeScriptString m_script; }; diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 1ba4454..3ce15cb 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -128,6 +128,8 @@ private slots: void qmlAttachedPropertiesObjectMethod(); + void customOnProperty(); + // regression tests for crashes void crash1(); void crash2(); @@ -232,6 +234,9 @@ void tst_qdeclarativelanguage::errors_data() QTest::newRow("invalidID.4") << "invalidID.4.qml" << "invalidID.4.errors.txt" << false; QTest::newRow("invalidID.5") << "invalidID.5.qml" << "invalidID.5.errors.txt" << false; QTest::newRow("invalidID.6") << "invalidID.6.qml" << "invalidID.6.errors.txt" << false; + QTest::newRow("invalidID.7") << "invalidID.7.qml" << "invalidID.7.errors.txt" << false; + QTest::newRow("invalidID.8") << "invalidID.8.qml" << "invalidID.8.errors.txt" << false; + QTest::newRow("invalidID.9") << "invalidID.9.qml" << "invalidID.9.errors.txt" << false; QTest::newRow("unsupportedProperty") << "unsupportedProperty.qml" << "unsupportedProperty.errors.txt" << false; QTest::newRow("nullDotProperty") << "nullDotProperty.qml" << "nullDotProperty.errors.txt" << true; @@ -252,6 +257,9 @@ void tst_qdeclarativelanguage::errors_data() QTest::newRow("invalidGroupedProperty.5") << "invalidGroupedProperty.5.qml" << "invalidGroupedProperty.5.errors.txt" << false; QTest::newRow("invalidGroupedProperty.6") << "invalidGroupedProperty.6.qml" << "invalidGroupedProperty.6.errors.txt" << false; QTest::newRow("invalidGroupedProperty.7") << "invalidGroupedProperty.7.qml" << "invalidGroupedProperty.7.errors.txt" << true; + QTest::newRow("invalidGroupedProperty.8") << "invalidGroupedProperty.8.qml" << "invalidGroupedProperty.8.errors.txt" << false; + QTest::newRow("invalidGroupedProperty.9") << "invalidGroupedProperty.9.qml" << "invalidGroupedProperty.9.errors.txt" << false; + QTest::newRow("invalidGroupedProperty.10") << "invalidGroupedProperty.10.qml" << "invalidGroupedProperty.10.errors.txt" << false; QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false; QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false; @@ -288,6 +296,17 @@ void tst_qdeclarativelanguage::errors_data() QTest::newRow("Component.5") << "component.5.qml" << "component.5.errors.txt" << false; QTest::newRow("Component.6") << "component.6.qml" << "component.6.errors.txt" << false; + QTest::newRow("MultiSet.1") << "multiSet.1.qml" << "multiSet.1.errors.txt" << false; + QTest::newRow("MultiSet.2") << "multiSet.2.qml" << "multiSet.2.errors.txt" << false; + QTest::newRow("MultiSet.3") << "multiSet.3.qml" << "multiSet.3.errors.txt" << false; + QTest::newRow("MultiSet.4") << "multiSet.4.qml" << "multiSet.4.errors.txt" << false; + QTest::newRow("MultiSet.5") << "multiSet.5.qml" << "multiSet.5.errors.txt" << false; + QTest::newRow("MultiSet.6") << "multiSet.6.qml" << "multiSet.6.errors.txt" << false; + QTest::newRow("MultiSet.7") << "multiSet.7.qml" << "multiSet.7.errors.txt" << false; + QTest::newRow("MultiSet.8") << "multiSet.8.qml" << "multiSet.8.errors.txt" << false; + QTest::newRow("MultiSet.9") << "multiSet.9.qml" << "multiSet.9.errors.txt" << false; + QTest::newRow("MultiSet.10") << "multiSet.10.qml" << "multiSet.10.errors.txt" << false; + QTest::newRow("invalidAttachedProperty.1") << "invalidAttachedProperty.1.qml" << "invalidAttachedProperty.1.errors.txt" << false; QTest::newRow("invalidAttachedProperty.2") << "invalidAttachedProperty.2.qml" << "invalidAttachedProperty.2.errors.txt" << false; QTest::newRow("invalidAttachedProperty.3") << "invalidAttachedProperty.3.qml" << "invalidAttachedProperty.3.errors.txt" << false; @@ -316,9 +335,6 @@ void tst_qdeclarativelanguage::errors() QFETCH(QString, errorFile); QFETCH(bool, create); - if (file == "invalidID.6.qml") - QTest::ignoreMessage(QtWarningMsg, "id \"StartsWithUpperCase\" is invalid: ids cannot start with uppercase letters"); - QDeclarativeComponent component(&engine, TEST_FILE(file)); if(create) { @@ -1378,6 +1394,19 @@ void tst_qdeclarativelanguage::crash2() QDeclarativeComponent component(&engine, TEST_FILE("crash2.qml")); } +// QTBUG-8676 +void tst_qdeclarativelanguage::customOnProperty() +{ + QDeclarativeComponent component(&engine, TEST_FILE("customOnProperty.qml")); + + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("on").toInt(), 10); + + delete object; +} void tst_qdeclarativelanguage::initTestCase() { diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml new file mode 100644 index 0000000..a41f003 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml @@ -0,0 +1,71 @@ +import Qt 4.6 + +Rectangle { + width: 180; height: 120; color: "white" + Component { + id: delegate + Item { + id: wrapper + width: 180; height: 40; + Column { + x: 5; y: 5 + Text { text: '<b>Name:</b> ' + name } + Text { text: '<b>Number:</b> ' + number } + } + } + } + Component { + id: highlightRed + Rectangle { + color: "red" + radius: 10 + opacity: 0.5 + } + } + ListView { + objectName: "listView" + anchors.fill: parent + model: listModel + delegate: delegate + highlight: highlightRed + focus: true + highlightFollowsCurrentItem: true + preferredHighlightBegin: 0.0 + preferredHighlightEnd: 0.0 + highlightRangeMode: ListView.ApplyRange + keyNavigationWraps: true + cacheBuffer: 10 + snapMode: ListView.SnapToItem + } + + data:[ + ListModel { + id: listModel + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + }, + ListModel { + objectName: "alternateModel" + ListElement { + name: "Jack" + number: "555 8426" + } + ListElement { + name: "Mary" + number: "555 3264" + } + } + ] +} + +
\ No newline at end of file diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index f15f26b..a36224f 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -38,15 +38,18 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include <QtTest/QtTest> -#include <QStringListModel> -#include <private/qlistmodelinterface_p.h> -#include <qdeclarativeview.h> -#include <private/qdeclarativelistview_p.h> -#include <private/qdeclarativetext_p.h> -#include <private/qdeclarativevisualitemmodel_p.h> -#include <qdeclarativecontext.h> -#include <qdeclarativeexpression.h> +#include <QtGui/QStringListModel> +#include <QtDeclarative/qdeclarativeview.h> +#include <QtDeclarative/qdeclarativeengine.h> +#include <QtDeclarative/qdeclarativecontext.h> +#include <QtDeclarative/qdeclarativeexpression.h> +#include <QtDeclarative/private/qdeclarativelistview_p.h> +#include <QtDeclarative/private/qdeclarativetext_p.h> +#include <QtDeclarative/private/qdeclarativevisualitemmodel_p.h> +#include <QtDeclarative/private/qdeclarativelistmodel_p.h> +#include <QtDeclarative/private/qlistmodelinterface_p.h> class tst_QDeclarativeListView : public QObject { @@ -82,6 +85,9 @@ private slots: void cacheBuffer(); void positionViewAtIndex(); void resetModel(); + void propertyChanges(); + void componentChanges(); + void modelChanges(); private: template <class T> void items(); @@ -240,7 +246,7 @@ public: setRoleNames(roles); } - int rowCount(const QModelIndex &parent=QModelIndex()) const { return list.count(); } + int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); } QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const { QVariant rv; if (role == Name) @@ -379,6 +385,7 @@ void tst_QDeclarativeListView::items() delete canvas; } + template <class T> void tst_QDeclarativeListView::changed() { @@ -1275,6 +1282,149 @@ void tst_QDeclarativeListView::resetModel() } } +void tst_QDeclarativeListView::propertyChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView"); + QVERIFY(listView); + + QSignalSpy highlightFollowsCurrentItemSpy(listView, SIGNAL(highlightFollowsCurrentItemChanged())); + QSignalSpy preferredHighlightBeginSpy(listView, SIGNAL(preferredHighlightBeginChanged())); + QSignalSpy preferredHighlightEndSpy(listView, SIGNAL(preferredHighlightEndChanged())); + QSignalSpy highlightRangeModeSpy(listView, SIGNAL(highlightRangeModeChanged())); + QSignalSpy keyNavigationWrapsSpy(listView, SIGNAL(keyNavigationWrapsChanged())); + QSignalSpy cacheBufferSpy(listView, SIGNAL(cacheBufferChanged())); + QSignalSpy snapModeSpy(listView, SIGNAL(snapModeChanged())); + + QCOMPARE(listView->highlightFollowsCurrentItem(), true); + QCOMPARE(listView->preferredHighlightBegin(), 0.0); + QCOMPARE(listView->preferredHighlightEnd(), 0.0); + QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::ApplyRange); + QCOMPARE(listView->isWrapEnabled(), true); + QCOMPARE(listView->cacheBuffer(), 10); + QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapToItem); + + listView->setHighlightFollowsCurrentItem(false); + listView->setPreferredHighlightBegin(1.0); + listView->setPreferredHighlightEnd(1.0); + listView->setHighlightRangeMode(QDeclarativeListView::StrictlyEnforceRange); + listView->setWrapEnabled(false); + listView->setCacheBuffer(3); + listView->setSnapMode(QDeclarativeListView::SnapOneItem); + + QCOMPARE(listView->highlightFollowsCurrentItem(), false); + QCOMPARE(listView->preferredHighlightBegin(), 1.0); + QCOMPARE(listView->preferredHighlightEnd(), 1.0); + QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange); + QCOMPARE(listView->isWrapEnabled(), false); + QCOMPARE(listView->cacheBuffer(), 3); + QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapOneItem); + + QCOMPARE(highlightFollowsCurrentItemSpy.count(),1); + QCOMPARE(preferredHighlightBeginSpy.count(),1); + QCOMPARE(preferredHighlightEndSpy.count(),1); + QCOMPARE(highlightRangeModeSpy.count(),1); + QCOMPARE(keyNavigationWrapsSpy.count(),1); + QCOMPARE(cacheBufferSpy.count(),1); + QCOMPARE(snapModeSpy.count(),1); + + listView->setHighlightFollowsCurrentItem(false); + listView->setPreferredHighlightBegin(1.0); + listView->setPreferredHighlightEnd(1.0); + listView->setHighlightRangeMode(QDeclarativeListView::StrictlyEnforceRange); + listView->setWrapEnabled(false); + listView->setCacheBuffer(3); + listView->setSnapMode(QDeclarativeListView::SnapOneItem); + + QCOMPARE(highlightFollowsCurrentItemSpy.count(),1); + QCOMPARE(preferredHighlightBeginSpy.count(),1); + QCOMPARE(preferredHighlightEndSpy.count(),1); + QCOMPARE(highlightRangeModeSpy.count(),1); + QCOMPARE(keyNavigationWrapsSpy.count(),1); + QCOMPARE(cacheBufferSpy.count(),1); + QCOMPARE(snapModeSpy.count(),1); + + delete canvas; +} + +void tst_QDeclarativeListView::componentChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView"); + QVERIFY(listView); + + QDeclarativeComponent component(canvas->engine()); + component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); + + QDeclarativeComponent delegateComponent(canvas->engine()); + delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile("")); + + QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged())); + QSignalSpy delegateSpy(listView, SIGNAL(delegateChanged())); + QSignalSpy headerSpy(listView, SIGNAL(headerChanged())); + QSignalSpy footerSpy(listView, SIGNAL(footerChanged())); + + listView->setHighlight(&component); + listView->setHeader(&component); + listView->setFooter(&component); + listView->setDelegate(&delegateComponent); + + QCOMPARE(listView->highlight(), &component); + QCOMPARE(listView->header(), &component); + QCOMPARE(listView->footer(), &component); + QCOMPARE(listView->delegate(), &delegateComponent); + + QCOMPARE(highlightSpy.count(),1); + QCOMPARE(delegateSpy.count(),1); + QCOMPARE(headerSpy.count(),1); + QCOMPARE(footerSpy.count(),1); + + listView->setHighlight(&component); + listView->setHeader(&component); + listView->setFooter(&component); + listView->setDelegate(&delegateComponent); + + QCOMPARE(highlightSpy.count(),1); + QCOMPARE(delegateSpy.count(),1); + QCOMPARE(headerSpy.count(),1); + QCOMPARE(footerSpy.count(),1); + + delete canvas; +} + +void tst_QDeclarativeListView::modelChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView"); + QVERIFY(listView); + + QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel"); + QVERIFY(alternateModel); + QVariant modelVariant = QVariant::fromValue(alternateModel); + QSignalSpy modelSpy(listView, SIGNAL(modelChanged())); + + listView->setModel(modelVariant); + QCOMPARE(listView->model(), modelVariant); + QCOMPARE(modelSpy.count(),1); + + listView->setModel(modelVariant); + QCOMPARE(modelSpy.count(),1); + + listView->setModel(QVariant()); + QCOMPARE(modelSpy.count(),2); + + delete canvas; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items<TestModel>(); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp index f3caa7f..92f7aef 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp @@ -50,7 +50,6 @@ class tst_qdeclarativemoduleplugin : public QObject public: tst_qdeclarativemoduleplugin() { QCoreApplication::addLibraryPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("plugin")); -qDebug() << QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("plugin"); } private slots: diff --git a/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp b/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp index 26ff3d5..a9a0077 100644 --- a/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp +++ b/tests/auto/declarative/qdeclarativenumberformatter/tst_qdeclarativenumberformatter.cpp @@ -172,9 +172,11 @@ tst_qdeclarativenumberformatter::tst_qdeclarativenumberformatter() << "00,000,001.0000" << "00,000,001.0100"; // end + /* qDebug() << "strings.size()" << strings.size() << "\nformats.size()" << formats.size() << "texts.size()" << texts.size(); + */ } void tst_qdeclarativenumberformatter::text_data() diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particles.qml b/tests/auto/declarative/qdeclarativeparticles/data/particles.qml index c58927e..0d42645 100644 --- a/tests/auto/declarative/qdeclarativeparticles/data/particles.qml +++ b/tests/auto/declarative/qdeclarativeparticles/data/particles.qml @@ -8,7 +8,7 @@ Rectangle{ objectName: "particles" width:1; height:1; anchors.centerIn: parent; opacity: 1 lifeSpan: 100; lifeSpanDeviation: 20; count:1000; - fadeInDuration: 20; fadeOutDuration: 20; count: -1; emissionRate: 1000 + fadeInDuration: 20; fadeOutDuration: 20; emissionRate: 1000 angle: 0; angleDeviation: 360; velocity: 500; velocityDeviation:30 source: "particle.png" } diff --git a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml index 627f38a..ab1538b 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml @@ -33,7 +33,7 @@ Rectangle { height: 320 model: testModel delegate: delegate - snapPosition: 0.01 + snapPosition: 0.0001 path: Path { startY: 120 startX: 160 diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml index 8fa8d59..c5d88cd 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml @@ -39,7 +39,7 @@ Rectangle { height: 320 model: testModel delegate: delegate - snapPosition: 0.01 + snapPosition: 0.0001 path: Path { startY: 120 startX: 160 diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml index 0d5c98b..c825292 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml @@ -1,7 +1,7 @@ import Qt 4.6 PathView { - id: photoPathView; model: rssModel; delegate: photoDelegate + id: photoPathView y: 100; width: 800; height: 330; pathItemCount: 10; z: 1 path: Path { diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml index 412cca2..f8ed29f 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml @@ -1,9 +1,9 @@ import Qt 4.6 PathView { - id: photoPathView; model: rssModel; delegate: photoDelegate + id: photoPathView y: 100; width: 800; height: 330; pathItemCount: 4; offset: 10 - dragMargin: 24; snapPosition: 50 + dragMargin: 24; snapPosition: 0.50 path: Path { startX: -50; startY: 40; diff --git a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml new file mode 100644 index 0000000..db70b7b --- /dev/null +++ b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml @@ -0,0 +1,115 @@ +import Qt 4.6 + +Rectangle { + width: 350; height: 220; color: "white" + Component { + id: myDelegate + Item { + id: wrapper + width: 180; height: 40; + opacity: PathView.opacity + Column { + x: 5; y: 5 + Text { text: '<b>Name:</b> ' + name } + Text { text: '<b>Number:</b> ' + number } + } + } + } + + PathView { + snapPosition: 0.1 + dragMargin: 5.0 + id: pathView + objectName: "pathView" + anchors.fill: parent + model: listModel + delegate: myDelegate + focus: true + path: Path { + id: myPath + objectName: "path" + startX: 220; startY: 200 + PathAttribute { name: "opacity"; value: 1.0; objectName: "pathAttribute"; } + PathQuad { x: 220; y: 25; controlX: 260; controlY: 75 } + PathAttribute { name: "opacity"; value: 0.3 } + PathQuad { x: 220; y: 200; controlX: -20; controlY: 75 } + } + Timer { + interval: 2000; running: true; repeat: true + onTriggered: { + if (pathView.path == alternatePath) + pathView.path = myPath; + else + pathView.path = alternatePath; + } + } + } + + data:[ + ListModel { + id: listModel + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + }, + ListModel { + objectName: "alternateModel" + ListElement { + name: "Jack" + number: "555 8426" + } + ListElement { + name: "Mary" + number: "555 3264" + } + }, + Path { + id: alternatePath + objectName: "alternatePath" + startX: 100; startY: 40 + PathAttribute { name: "opacity"; value: 0.0 } + PathLine { x: 100; y: 160 } + PathAttribute { name: "opacity"; value: 0.2 } + PathLine { x: 300; y: 160 } + PathAttribute { name: "opacity"; value: 0.0 } + PathLine { x: 300; y: 40 } + PathAttribute { name: "opacity"; value: 0.2 } + PathLine { x: 100; y: 40 } + } + ] +} + + diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 79bc607..fa4e9d3 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -38,20 +38,23 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include <private/qdeclarativepathview_p.h> -#include <private/qdeclarativepath_p.h> -#include <qdeclarativecontext.h> -#include <qdeclarativeexpression.h> -#include <qtest.h> + +#include <QtTest/QtTest> +#include <QtDeclarative/qdeclarativeview.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qdeclarativeview.h> +#include <QtDeclarative/qdeclarativecontext.h> +#include <QtDeclarative/qdeclarativeexpression.h> +#include <QtDeclarative/private/qdeclarativepathview_p.h> +#include <QtDeclarative/private/qdeclarativepath_p.h> #include <QtDeclarative/private/qdeclarativetext_p.h> #include <QtDeclarative/private/qdeclarativerectangle_p.h> +#include <QtDeclarative/private/qdeclarativelistmodel_p.h> +#include <QtDeclarative/private/qdeclarativevaluetype_p.h> #include <QAbstractListModel> #include <QStringListModel> #include <QFile> -#include <private/qdeclarativevaluetype_p.h> + #include "../../../shared/util.h" class tst_QDeclarativePathView : public QObject @@ -69,6 +72,11 @@ private slots: void path(); void pathMoved(); void resetModel(); + void propertyChanges(); + void pathChanges(); + void componentChanges(); + void modelChanges(); + private: QDeclarativeView *createView(); @@ -120,7 +128,7 @@ public: setRoleNames(roles); } - int rowCount(const QModelIndex &parent=QModelIndex()) const { return list.count(); } + int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); } QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const { QVariant rv; if (role == Name) @@ -465,6 +473,149 @@ void tst_QDeclarativePathView::resetModel() } } +void tst_QDeclarativePathView::propertyChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView"); + QVERIFY(pathView); + + QSignalSpy snapPositionSpy(pathView, SIGNAL(snapPositionChanged())); + QSignalSpy dragMarginSpy(pathView, SIGNAL(dragMarginChanged())); + + QCOMPARE(pathView->snapPosition(), 0.1); + QCOMPARE(pathView->dragMargin(), 5.0); + + pathView->setSnapPosition(0.4); + pathView->setDragMargin(20.0); + + QCOMPARE(pathView->snapPosition(), 0.4); + QCOMPARE(pathView->dragMargin(), 20.0); + + QCOMPARE(snapPositionSpy.count(), 1); + QCOMPARE(dragMarginSpy.count(), 1); + + pathView->setSnapPosition(0.4); + pathView->setDragMargin(20.0); + + QCOMPARE(snapPositionSpy.count(), 1); + QCOMPARE(dragMarginSpy.count(), 1); + delete canvas; +} + +void tst_QDeclarativePathView::pathChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView"); + QVERIFY(pathView); + + QDeclarativePath *path = canvas->rootObject()->findChild<QDeclarativePath*>("path"); + QVERIFY(path); + + QSignalSpy startXSpy(path, SIGNAL(startXChanged())); + QSignalSpy startYSpy(path, SIGNAL(startYChanged())); + + QCOMPARE(path->startX(), 220.0); + QCOMPARE(path->startY(), 200.0); + + path->setStartX(240.0); + path->setStartY(220.0); + + QCOMPARE(path->startX(), 240.0); + QCOMPARE(path->startY(), 220.0); + + QCOMPARE(startXSpy.count(),1); + QCOMPARE(startYSpy.count(),1); + + path->setStartX(240); + path->setStartY(220); + + QCOMPARE(startXSpy.count(),1); + QCOMPARE(startYSpy.count(),1); + + QDeclarativePath *alternatePath = canvas->rootObject()->findChild<QDeclarativePath*>("alternatePath"); + QVERIFY(alternatePath); + + QSignalSpy pathSpy(pathView, SIGNAL(pathChanged())); + + QCOMPARE(pathView->path(), path); + + pathView->setPath(alternatePath); + QCOMPARE(pathView->path(), alternatePath); + QCOMPARE(pathSpy.count(),1); + + pathView->setPath(alternatePath); + QCOMPARE(pathSpy.count(),1); + + QDeclarativePathAttribute *pathAttribute = canvas->rootObject()->findChild<QDeclarativePathAttribute*>("pathAttribute"); + QVERIFY(pathAttribute); + + QSignalSpy nameSpy(pathAttribute, SIGNAL(nameChanged())); + QCOMPARE(pathAttribute->name(), QString("opacity")); + + pathAttribute->setName("scale"); + QCOMPARE(pathAttribute->name(), QString("scale")); + QCOMPARE(nameSpy.count(),1); + + pathAttribute->setName("scale"); + QCOMPARE(nameSpy.count(),1); + delete canvas; +} + +void tst_QDeclarativePathView::componentChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView"); + QVERIFY(pathView); + + QDeclarativeComponent delegateComponent(canvas->engine()); + delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile("")); + + QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged())); + + pathView->setDelegate(&delegateComponent); + QCOMPARE(pathView->delegate(), &delegateComponent); + QCOMPARE(delegateSpy.count(),1); + + pathView->setDelegate(&delegateComponent); + QCOMPARE(delegateSpy.count(),1); + delete canvas; +} + +void tst_QDeclarativePathView::modelChanges() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); + + QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView"); + QVERIFY(pathView); + + QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel"); + QVERIFY(alternateModel); + QVariant modelVariant = QVariant::fromValue(alternateModel); + QSignalSpy modelSpy(pathView, SIGNAL(modelChanged())); + + pathView->setModel(modelVariant); + QCOMPARE(pathView->model(), modelVariant); + QCOMPARE(modelSpy.count(),1); + + pathView->setModel(modelVariant); + QCOMPARE(modelSpy.count(),1); + + pathView->setModel(QVariant()); + QCOMPARE(modelSpy.count(),2); + + delete canvas; +} QDeclarativeView *tst_QDeclarativePathView::createView() { diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp index 3a8a892..d23d74c 100644 --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp @@ -365,7 +365,7 @@ void tst_QDeclarativePositioners::test_grid_animated() } void tst_QDeclarativePositioners::test_propertychanges() { - QDeclarativeView *canvas = createView("data/propertychanges.qml"); + QDeclarativeView *canvas = createView(SRCDIR "/data/propertychanges.qml"); QDeclarativeGrid *grid = qobject_cast<QDeclarativeGrid*>(canvas->rootObject()); QDeclarativeTransition *rowTransition = canvas->rootObject()->findChild<QDeclarativeTransition*>("rowTransition"); diff --git a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml new file mode 100644 index 0000000..1dfb3e1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +QtObject { + property int a: 10 +} + diff --git a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml new file mode 100644 index 0000000..8085db2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml @@ -0,0 +1,9 @@ +import Qt 4.6 + +QtObject { + property TestType test + + test: TestType { + property int b: 19 + } +} diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro index 22e50cc..af1e1b6 100644 --- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro +++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro @@ -3,3 +3,5 @@ contains(QT_CONFIG,declarative): QT += declarative macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeproperty.cpp + +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp index 0333d98..9b8a643 100644 --- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp +++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp @@ -46,6 +46,14 @@ #include <private/qguard_p.h> #include <private/qdeclarativebinding_p.h> #include <QtGui/QLineEdit> +#include <QtCore/qfileinfo.h> +#include <QtCore/qdir.h> + +inline QUrl TEST_FILE(const QString &filename) +{ + QFileInfo fileInfo(__FILE__); + return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath(QLatin1String("data/") + filename)); +} class MyQmlObject : public QObject { @@ -181,6 +189,7 @@ class PropertyObject : public QObject Q_PROPERTY(QUrl url READ url WRITE setUrl); Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty); Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal) + Q_PROPERTY(MyQmlObject *qmlObject READ qmlObject); Q_CLASSINFO("DefaultProperty", "defaultProperty"); public: @@ -202,6 +211,7 @@ public: int propertyWithNotify() const { return m_propertyWithNotify; } void setPropertyWithNotify(int i) { m_propertyWithNotify = i; emit oddlyNamedNotifySignal(); } + MyQmlObject *qmlObject() { return &m_qmlObject; } signals: void clicked(); void oddlyNamedNotifySignal(); @@ -211,6 +221,7 @@ private: QRect m_rect; QUrl m_url; int m_propertyWithNotify; + MyQmlObject m_qmlObject; }; QML_DECLARE_TYPE(PropertyObject); @@ -953,6 +964,32 @@ void tst_qdeclarativeproperty::read() QCOMPARE(p.read(), QVariant()); } + // Object property + { + PropertyObject o; + QDeclarativeProperty p(&o, "qmlObject"); + QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object); + QCOMPARE(p.propertyType(), qMetaTypeId<MyQmlObject*>()); + QVariant v = p.read(); + QVERIFY(v.userType() == QMetaType::QObjectStar); + QVERIFY(qvariant_cast<QObject *>(v) == o.qmlObject()); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("readSynthesizedObject.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + + QDeclarativeProperty p(object, "test", &engine); + + QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object); + QVERIFY(p.propertyType() != QMetaType::QObjectStar); + + QVariant v = p.read(); + QVERIFY(v.userType() == QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject *>(v)->property("a").toInt(), 10); + QCOMPARE(qvariant_cast<QObject *>(v)->property("b").toInt(), 19); + } + // Attached property { QDeclarativeComponent component(&engine); diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml new file mode 100644 index 0000000..e62749a --- /dev/null +++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml @@ -0,0 +1,19 @@ +import Qt 4.6 + +QtObject { + property date date1: "2008-12-24" + property string test1: Qt.formatDate(date1) + property string test2: Qt.formatDate(date1, Qt.DefaultLocaleLongDate) + property string test3: Qt.formatDate(date1, "ddd MMMM d yy") + + property var time1: new Date(0,0,0,14,15,38,200) + property string test4: Qt.formatTime(time1) + property string test5: Qt.formatTime(time1, Qt.DefaultLocaleLongDate) + property string test6: Qt.formatTime(time1, "H:m:s a") + property string test7: Qt.formatTime(time1, "hh:mm:ss.zzz") + + property var dateTime1: new Date(1978,2,4,9,13,54) + property string test8: Qt.formatDateTime(dateTime1) + property string test9: Qt.formatDateTime(dateTime1, Qt.DefaultLocaleLongDate) + property string test10: Qt.formatDateTime(dateTime1, "M/d/yy H:m:s a") +} diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp index 9ec6872..90afd4e 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp @@ -67,12 +67,12 @@ private slots: void darker(); void tint(); void closestAngle(); - void playSound(); void openUrlExternally(); void md5(); void createComponent(); void createQmlObject(); void consoleLog(); + void formatting(); private: QDeclarativeEngine engine; @@ -279,12 +279,6 @@ void tst_qdeclarativeqt::closestAngle() delete object; } -void tst_qdeclarativeqt::playSound() -{ - QEXPECT_FAIL("", "How do we test this?", Abort); - QVERIFY(false); -} - void tst_qdeclarativeqt::openUrlExternally() { QEXPECT_FAIL("", "How do we test this?", Abort); @@ -364,6 +358,34 @@ void tst_qdeclarativeqt::consoleLog() delete object; } +void tst_qdeclarativeqt::formatting() +{ + QDeclarativeComponent component(&engine, TEST_FILE("formatting.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + + QDate date1(2008,12,24); + QCOMPARE(object->property("date1").toDate(), date1); + QCOMPARE(object->property("test1").toString(), date1.toString(Qt::DefaultLocaleShortDate)); + QCOMPARE(object->property("test2").toString(), date1.toString(Qt::DefaultLocaleLongDate)); + QCOMPARE(object->property("test3").toString(), date1.toString("ddd MMMM d yy")); + + QTime time1(14,15,38,200); + QCOMPARE(object->property("time1").toTime(), time1); + QCOMPARE(object->property("test4").toString(), time1.toString(Qt::DefaultLocaleShortDate)); + QCOMPARE(object->property("test5").toString(), time1.toString(Qt::DefaultLocaleLongDate)); + QCOMPARE(object->property("test6").toString(), time1.toString("H:m:s a")); + QCOMPARE(object->property("test7").toString(), time1.toString("hh:mm:ss.zzz")); + + QDateTime dateTime1(QDate(1978,03,04),QTime(9,13,54)); + QCOMPARE(object->property("dateTime1").toDateTime(),dateTime1); + QCOMPARE(object->property("test8").toString(), dateTime1.toString(Qt::DefaultLocaleShortDate)); + QCOMPARE(object->property("test9").toString(), dateTime1.toString(Qt::DefaultLocaleLongDate)); + QCOMPARE(object->property("test10").toString(), dateTime1.toString("M/d/yy H:m:s a")); + + delete object; +} + QTEST_MAIN(tst_qdeclarativeqt) #include "tst_qdeclarativeqt.moc" diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index b677fec..b1935df 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -663,15 +663,17 @@ void tst_qdeclarativetextedit::delegateLoading() QVERIFY(delegate); view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail1.qml")); view->show(); + QTRY_VERIFY(view->status()==QDeclarativeView::Error); view->setFocus(); QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail2.qml")); view->show(); + QTRY_VERIFY(view->status()==QDeclarativeView::Error); view->setFocus(); QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test - //ErrorB should get a component which is ready but component.create() returns null + //A test should be added here with a component which is ready but component.create() returns null //Not sure how to accomplish this with QDeclarativeTextEdits cursor delegate - //###This could be a case of overzealous defensive programming + //###This was only needed for code coverage, and could be a case of overzealous defensive programming //delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateErrorB"); //QVERIFY(!delegate); } diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml index 026ae83..0897847 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml @@ -3,6 +3,6 @@ import Test 1.0 MyTypeObject { property int value: 13; - rect.x: MyOffsetValueInterceptor {} + MyOffsetValueInterceptor on rect.x {} rect.x: value } diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml index d4d4391..717f350 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml @@ -1,5 +1,5 @@ import Test 1.0 MyTypeObject { - rect.x: MyConstantValueSource {} + MyConstantValueSource on rect.x {} } diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 69646b9..8732215 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -502,10 +502,9 @@ void tst_qdeclarativevaluetypes::valueInterceptors() QDeclarativeComponent component(&engine, TEST_FILE("valueInterceptors.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); checkNoErrors(component); - QEXPECT_FAIL("", "QT-2920", Abort); QVERIFY(object != 0); - QCOMPARE(object->rect().x(), 26); + QCOMPARE(object->rect().x(), 13); object->setProperty("value", 99); diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.qml b/tests/auto/declarative/qdeclarativewebview/data/basic.qml index 5394837..f0b41ef 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/basic.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/basic.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { url: "basic.html" diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.qml b/tests/auto/declarative/qdeclarativewebview/data/elements.qml index 7c030e6..16e5788 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/elements.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/elements.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { url: "elements.html" diff --git a/tests/auto/declarative/qdeclarativewebview/data/forward.png b/tests/auto/declarative/qdeclarativewebview/data/forward.png Binary files differnew file mode 100644 index 0000000..a82533e --- /dev/null +++ b/tests/auto/declarative/qdeclarativewebview/data/forward.png diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml index 07eee88..0e92e0e 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { url: "javaScript.html" diff --git a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml index 1460f30..f827238 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { url: "does-not-exist.html" diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml index 0bc8263..4d9df43 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml @@ -1,6 +1,7 @@ // Demonstrates opening new WebViews from HTML import Qt 4.6 +import org.webkit 1.0 Grid { columns: 3 diff --git a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml index 3dd4e51..0770acf 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Item { width: 240 @@ -30,4 +31,4 @@ Item { pressGrabTime: 200 } } -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml index 063b5a8..9e17597 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { html: "<p>This is a <b>string</b> set on the WebView" diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro index 6af0a60..20173c6 100644 --- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro +++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro @@ -3,8 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative contains(QT_CONFIG,webkit): QT += webkit macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativewebview.cpp testtypes.cpp -HEADERS += testtypes.h +SOURCES += tst_qdeclarativewebview.cpp # Define SRCDIR equal to test's source directory DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp index 6d16056..b63e14b 100644 --- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp +++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp @@ -43,15 +43,12 @@ #include "../../../shared/util.h" #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <private/qdeclarativewebview_p.h> -#include <private/qdeclarativewebview_p_p.h> #include <private/qdeclarativepositioners_p.h> #include <QtWebKit/qwebpage.h> #include <QtWebKit/qwebframe.h> #include <QtCore/qdir.h> #include <QtCore/qfile.h> #include <QtGui/qpainter.h> -#include "testtypes.h" class tst_qdeclarativewebview : public QObject { @@ -70,7 +67,7 @@ private slots: void setHtml(); void javaScript(); void cleanupTestCase(); - void pixelCache(); + //void pixelCache(); void newWindowParent(); void newWindowComponent(); void renderingEnabled(); @@ -89,7 +86,6 @@ private: void tst_qdeclarativewebview::initTestCase() { - registerTypes(); } static QString strippedHtml(QString html) @@ -148,81 +144,82 @@ void tst_qdeclarativewebview::basicProperties() checkNoErrors(component); QWebSettings::enablePersistentStorage(tmpDir()); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->title(),QString("Basic")); - QTRY_COMPARE(wv->icon().width(), 48); - QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.png")); - QCOMPARE(wv->statusText(),QString("status here")); - QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html())); - QCOMPARE(wv->width(), 123.0); - QCOMPARE(wv->preferredWidth(), 0); - QCOMPARE(wv->preferredHeight(), 0); - QCOMPARE(wv->zoomFactor(), 1.0); - QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); - QCOMPARE(wv->status(), QDeclarativeWebView::Ready); - QVERIFY(wv->reloadAction()); - QVERIFY(wv->reloadAction()->isEnabled()); - QVERIFY(wv->backAction()); - QVERIFY(!wv->backAction()->isEnabled()); - QVERIFY(wv->forwardAction()); - QVERIFY(!wv->forwardAction()->isEnabled()); - QVERIFY(wv->stopAction()); - QVERIFY(!wv->stopAction()->isEnabled()); - - wv->setPixelCacheSize(0); // mainly testing that it doesn't crash or anything! - QCOMPARE(wv->pixelCacheSize(),0); - wv->reloadAction()->trigger(); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("title").toString(),QString("Basic")); + QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48); + QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png")); + QCOMPARE(wv->property("statusText").toString(),QString("status here")); + QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString())); + QCOMPARE(wv->property("width").toDouble(), 123.0); + QCOMPARE(wv->property("preferredWidth").toInt(), 0); + QCOMPARE(wv->property("preferredHeight").toInt(), 0); + QCOMPARE(wv->property("zoomFactor").toDouble(), 1.0); + QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); + QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("back"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("stop"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled()); + + wv->setProperty("pixelCacheSize", 0); // mainly testing that it doesn't crash or anything! + QCOMPARE(wv->property("pixelCacheSize").toInt(),0); + qvariant_cast<QAction*>(wv->property("reload"))->trigger(); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); } void tst_qdeclarativewebview::settings() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml")); checkNoErrors(component); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); - QDeclarativeWebSettings *s = wv->settingsObject(); + QObject *s = QDeclarativeProperty(wv,"settings").object(); + QVERIFY(s != 0); // merely tests that setting gets stored (in QWebSettings) // behavioural tests are in WebKit. for (int b=0; b<=1; ++b) { bool on = !!b; - s->setAutoLoadImages(on); - s->setDeveloperExtrasEnabled(on); - s->setJavaEnabled(on); - s->setJavascriptCanAccessClipboard(on); - s->setJavascriptCanOpenWindows(on); - s->setJavascriptEnabled(on); - s->setLinksIncludedInFocusChain(on); - s->setLocalContentCanAccessRemoteUrls(on); - s->setLocalStorageDatabaseEnabled(on); - s->setOfflineStorageDatabaseEnabled(on); - s->setOfflineWebApplicationCacheEnabled(on); - s->setPluginsEnabled(on); - s->setPrintElementBackgrounds(on); - s->setPrivateBrowsingEnabled(on); - s->setZoomTextOnly(on); - - QVERIFY(s->autoLoadImages() == on); - QVERIFY(s->developerExtrasEnabled() == on); - QVERIFY(s->javaEnabled() == on); - QVERIFY(s->javascriptCanAccessClipboard() == on); - QVERIFY(s->javascriptCanOpenWindows() == on); - QVERIFY(s->javascriptEnabled() == on); - QVERIFY(s->linksIncludedInFocusChain() == on); - QVERIFY(s->localContentCanAccessRemoteUrls() == on); - QVERIFY(s->localStorageDatabaseEnabled() == on); - QVERIFY(s->offlineStorageDatabaseEnabled() == on); - QVERIFY(s->offlineWebApplicationCacheEnabled() == on); - QVERIFY(s->pluginsEnabled() == on); - QVERIFY(s->printElementBackgrounds() == on); - QVERIFY(s->privateBrowsingEnabled() == on); - QVERIFY(s->zoomTextOnly() == on); + s->setProperty("autoLoadImages", on); + s->setProperty("developerExtrasEnabled", on); + s->setProperty("javaEnabled", on); + s->setProperty("javascriptCanAccessClipboard", on); + s->setProperty("javascriptCanOpenWindows", on); + s->setProperty("javascriptEnabled", on); + s->setProperty("linksIncludedInFocusChain", on); + s->setProperty("localContentCanAccessRemoteUrls", on); + s->setProperty("localStorageDatabaseEnabled", on); + s->setProperty("offlineStorageDatabaseEnabled", on); + s->setProperty("offlineWebApplicationCacheEnabled", on); + s->setProperty("pluginsEnabled", on); + s->setProperty("printElementBackgrounds", on); + s->setProperty("privateBrowsingEnabled", on); + s->setProperty("zoomTextOnly", on); + + QVERIFY(s->property("autoLoadImages") == on); + QVERIFY(s->property("developerExtrasEnabled") == on); + QVERIFY(s->property("javaEnabled") == on); + QVERIFY(s->property("javascriptCanAccessClipboard") == on); + QVERIFY(s->property("javascriptCanOpenWindows") == on); + QVERIFY(s->property("javascriptEnabled") == on); + QVERIFY(s->property("linksIncludedInFocusChain") == on); + QVERIFY(s->property("localContentCanAccessRemoteUrls") == on); + QVERIFY(s->property("localStorageDatabaseEnabled") == on); + QVERIFY(s->property("offlineStorageDatabaseEnabled") == on); + QVERIFY(s->property("offlineWebApplicationCacheEnabled") == on); + QVERIFY(s->property("pluginsEnabled") == on); + QVERIFY(s->property("printElementBackgrounds") == on); + QVERIFY(s->property("privateBrowsingEnabled") == on); + QVERIFY(s->property("zoomTextOnly") == on); QVERIFY(s->property("autoLoadImages") == on); QVERIFY(s->property("developerExtrasEnabled") == on); @@ -248,65 +245,65 @@ void tst_qdeclarativewebview::historyNav() checkNoErrors(component); QWebSettings::enablePersistentStorage(tmpDir()); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); for (int i=1; i<=2; ++i) { - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->title(),QString("Basic")); - QTRY_COMPARE(wv->icon().width(), 48); - QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.png")); - QCOMPARE(wv->statusText(),QString("status here")); - QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html())); - QCOMPARE(wv->width(), 123.0); - QCOMPARE(wv->preferredWidth(), 0); - QCOMPARE(wv->zoomFactor(), 1.0); - QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); - QCOMPARE(wv->status(), QDeclarativeWebView::Ready); - QVERIFY(wv->reloadAction()); - QVERIFY(wv->reloadAction()->isEnabled()); - QVERIFY(wv->backAction()); - QVERIFY(!wv->backAction()->isEnabled()); - QVERIFY(wv->forwardAction()); - QVERIFY(!wv->forwardAction()->isEnabled()); - QVERIFY(wv->stopAction()); - QVERIFY(!wv->stopAction()->isEnabled()); - - wv->reloadAction()->trigger(); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("title").toString(),QString("Basic")); + QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48); + QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png")); + QCOMPARE(wv->property("statusText").toString(),QString("status here")); + QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString())); + QCOMPARE(wv->property("width").toDouble(), 123.0); + QCOMPARE(wv->property("preferredWidth").toDouble(), 0.0); + QCOMPARE(wv->property("zoomFactor").toDouble(), 1.0); + QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); + QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("back"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("stop"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled()); + + qvariant_cast<QAction*>(wv->property("reload"))->trigger(); } - wv->setUrl(QUrl::fromLocalFile(SRCDIR "/data/forward.html")); - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->title(),QString("Forward")); - QTRY_COMPARE(wv->icon().width(), 32); - QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/forward.png")); - QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/forward.html")), strippedHtml(wv->html())); - QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/forward.html")); - QCOMPARE(wv->status(), QDeclarativeWebView::Ready); - QCOMPARE(wv->statusText(),QString("")); - QVERIFY(wv->reloadAction()); - QVERIFY(wv->reloadAction()->isEnabled()); - QVERIFY(wv->backAction()); - QVERIFY(wv->backAction()->isEnabled()); - QVERIFY(wv->forwardAction()); - QVERIFY(!wv->forwardAction()->isEnabled()); - QVERIFY(wv->stopAction()); - QVERIFY(!wv->stopAction()->isEnabled()); - - wv->backAction()->trigger(); - - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->title(),QString("Basic")); - QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html())); - QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); - QCOMPARE(wv->status(), QDeclarativeWebView::Ready); - QVERIFY(wv->reloadAction()); - QVERIFY(wv->reloadAction()->isEnabled()); - QVERIFY(wv->backAction()); - QVERIFY(!wv->backAction()->isEnabled()); - QVERIFY(wv->forwardAction()); - QVERIFY(wv->forwardAction()->isEnabled()); - QVERIFY(wv->stopAction()); - QVERIFY(!wv->stopAction()->isEnabled()); + wv->setProperty("url", QUrl::fromLocalFile(SRCDIR "/data/forward.html")); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("title").toString(),QString("Forward")); + QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 32); + QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/forward.png")); + QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/forward.html")), strippedHtml(wv->property("html").toString())); + QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/forward.html")); + QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/); + QCOMPARE(wv->property("statusText").toString(),QString("")); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("back"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("back"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("stop"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled()); + + qvariant_cast<QAction*>(wv->property("back"))->trigger(); + + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("title").toString(),QString("Basic")); + QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString())); + QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); + QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("back"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))); + QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))->isEnabled()); + QVERIFY(qvariant_cast<QAction*>(wv->property("stop"))); + QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled()); } void tst_qdeclarativewebview::multipleWindows() @@ -328,16 +325,16 @@ void tst_qdeclarativewebview::loadError() checkNoErrors(component); QWebSettings::enablePersistentStorage(tmpDir()); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); for (int i=1; i<=2; ++i) { - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->title(),QString("")); - QCOMPARE(wv->statusText(),QString("")); // HTML 'status bar' text, not error message - QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/does-not-exist.html")); // Unlike QWebPage, which loses url - QCOMPARE(wv->status(), QDeclarativeWebView::Error); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("title").toString(),QString("")); + QCOMPARE(wv->property("statusText").toString(),QString("")); // HTML 'status bar' text, not error message + QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/does-not-exist.html")); // Unlike QWebPage, which loses url + QCOMPARE(wv->property("status").toInt(), 3 /*QDeclarativeWebView::Error*/); - wv->reloadAction()->trigger(); + qvariant_cast<QAction*>(wv->property("reload"))->trigger(); } } @@ -345,12 +342,12 @@ void tst_qdeclarativewebview::setHtml() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/sethtml.qml")); checkNoErrors(component); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); - QCOMPARE(wv->html(),QString("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>")); + QCOMPARE(wv->property("html").toString(),QString("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>")); QSignalSpy spy(wv, SIGNAL(htmlChanged())); - wv->setHtml(QString("<html><head><title>Basic</title></head><body><p>text</p></body></html>")); + wv->setProperty("html", QString("<html><head><title>Basic</title></head><body><p>text</p></body></html>")); QCOMPARE(spy.count(),1); } @@ -358,81 +355,91 @@ void tst_qdeclarativewebview::elementAreaAt() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/elements.qml")); checkNoErrors(component); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + /* not now it's a plugin... QCOMPARE(wv->elementAreaAt(40,30,100,100),QRect(1,1,75,54)); // Area A in data/elements.html QCOMPARE(wv->elementAreaAt(130,30,200,100),QRect(78,3,110,50)); // Area B QCOMPARE(wv->elementAreaAt(40,30,400,400),QRect(0,0,310,100)); // Whole view QCOMPARE(wv->elementAreaAt(130,30,280,280),QRect(76,1,223,54)); // Area BC QCOMPARE(wv->elementAreaAt(130,30,400,400),QRect(0,0,310,100)); // Whole view + */ } void tst_qdeclarativewebview::javaScript() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/javaScript.qml")); checkNoErrors(component); - QDeclarativeWebView *wv = qobject_cast<QDeclarativeWebView*>(component.create()); + QObject *wv = component.create(); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + /* not now it's a plugin... QCOMPARE(wv->evaluateJavaScript("123").toInt(), 123); QCOMPARE(wv->evaluateJavaScript("window.status").toString(), QString("status here")); QCOMPARE(wv->evaluateJavaScript("window.myjsname.qmlprop").toString(), QString("qmlvalue")); + */ } +/* +Cannot be done now that webkit is a plugin + void tst_qdeclarativewebview::pixelCache() { + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/pixelCache.qml")); checkNoErrors(component); MyWebView *wv = qobject_cast<MyWebView*>(component.create()); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress"), 1.0); QPixmap pm(150,150); QPainter p(&pm); wv->paint(&p,0,0); const int expected = 120*(150+128); // 120 = width of HTML page, 150=pixmap height, 128=cache extra area - QCOMPARE(wv->pixelsPainted(), expected); + QCOMPARE(wv->property("pixelsPainted"), expected); wv->paint(&p,0,0); - QCOMPARE(wv->pixelsPainted(), expected); // nothing new needed to be painted - wv->setPixelCacheSize(0); // clears the cache + QCOMPARE(wv->property("pixelsPainted"), expected); // nothing new needed to be painted + wv->setProperty("pixelCacheSize", 0); // clears the cache wv->paint(&p,0,0); - QCOMPARE(wv->pixelsPainted(), expected*2); // everything needed to be painted + QCOMPARE(wv->property("pixelsPainted"), expected*2); // everything needed to be painted // Note that painted things always go into the cache (even if they don't "fit"), // just that they will be removed if anything else needs to be painted. - wv->setPixelCacheSize(expected); // won't clear the cache + wv->setProperty("pixelCacheSize", expected); // won't clear the cache wv->paint(&p,0,0); - QCOMPARE(wv->pixelsPainted(), expected*2); // still there - wv->setPixelCacheSize(expected-1); // too small - will clear the cache + QCOMPARE(wv->property("pixelsPainted"), expected*2); // still there + wv->setProperty("pixelCacheSize", expected-1); // too small - will clear the cache wv->paint(&p,0,0); - QCOMPARE(wv->pixelsPainted(), expected*3); // repainted + QCOMPARE(wv->property("pixelsPainted"), expected*3); // repainted } +*/ void tst_qdeclarativewebview::newWindowParent() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); checkNoErrors(component); QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create()); - QDeclarativeWebView *wv = rootItem->findChild<QDeclarativeWebView*>("webView"); + QObject *wv = rootItem->findChild<QObject*>("webView"); QVERIFY(rootItem != 0); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); QDeclarativeItem* oldWindowParent = rootItem->findChild<QDeclarativeItem*>("oldWindowParent"); - QCOMPARE(wv->newWindowParent(), oldWindowParent); + QCOMPARE(qvariant_cast<QDeclarativeItem*>(wv->property("newWindowParent")), oldWindowParent); QSignalSpy newWindowParentSpy(wv, SIGNAL(newWindowParentChanged())); QDeclarativeItem* newWindowParent = rootItem->findChild<QDeclarativeItem*>("newWindowParent"); - wv->setNewWindowParent(newWindowParent); + wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent)); + QVERIFY(newWindowParent); QVERIFY(oldWindowParent); QVERIFY(oldWindowParent->childItems().count() == 0); - QCOMPARE(wv->newWindowParent(), newWindowParent); + QCOMPARE(wv->property("newWindowParent"), QVariant::fromValue(newWindowParent)); QCOMPARE(newWindowParentSpy.count(),1); - wv->setNewWindowParent(newWindowParent); + wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent)); QCOMPARE(newWindowParentSpy.count(),1); - wv->setNewWindowParent(0); + wv->setProperty("newWindowParent", QVariant::fromValue((QDeclarativeItem*)0)); QCOMPARE(newWindowParentSpy.count(),2); } @@ -441,23 +448,23 @@ void tst_qdeclarativewebview::newWindowComponent() QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); checkNoErrors(component); QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create()); - QDeclarativeWebView *wv = rootItem->findChild<QDeclarativeWebView*>("webView"); + QObject *wv = rootItem->findChild<QObject*>("webView"); QVERIFY(rootItem != 0); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); QDeclarativeComponent substituteComponent(&engine); substituteComponent.setData("import Qt 4.6; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile("")); QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged())); - wv->setNewWindowComponent(&substituteComponent); - QCOMPARE(wv->newWindowComponent(), &substituteComponent); + wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent)); + QCOMPARE(wv->property("newWindowComponent"), QVariant::fromValue(&substituteComponent)); QCOMPARE(newWindowComponentSpy.count(),1); - wv->setNewWindowComponent(&substituteComponent); + wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent)); QCOMPARE(newWindowComponentSpy.count(),1); - wv->setNewWindowComponent(0); + wv->setProperty("newWindowComponent", QVariant::fromValue((QDeclarativeComponent*)0)); QCOMPARE(newWindowComponentSpy.count(),2); } @@ -466,22 +473,22 @@ void tst_qdeclarativewebview::renderingEnabled() QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); checkNoErrors(component); QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create()); - QDeclarativeWebView *wv = rootItem->findChild<QDeclarativeWebView*>("webView"); + QObject *wv = rootItem->findChild<QObject*>("webView"); QVERIFY(rootItem != 0); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); - QVERIFY(wv->renderingEnabled()); + QVERIFY(wv->property("renderingEnabled").toBool()); QSignalSpy renderingEnabledSpy(wv, SIGNAL(renderingEnabledChanged())); - wv->setRenderingEnabled(false); - QVERIFY(!wv->renderingEnabled()); + wv->setProperty("renderingEnabled", false); + QVERIFY(!wv->property("renderingEnabled").toBool()); QCOMPARE(renderingEnabledSpy.count(),1); - wv->setRenderingEnabled(false); + wv->setProperty("renderingEnabled", false); QCOMPARE(renderingEnabledSpy.count(),1); - wv->setRenderingEnabled(true); + wv->setProperty("renderingEnabled", true); QCOMPARE(renderingEnabledSpy.count(),2); } @@ -490,21 +497,21 @@ void tst_qdeclarativewebview::pressGrabTime() QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml")); checkNoErrors(component); QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create()); - QDeclarativeWebView *wv = rootItem->findChild<QDeclarativeWebView*>("webView"); + QObject *wv = rootItem->findChild<QObject*>("webView"); QVERIFY(rootItem != 0); QVERIFY(wv != 0); - QTRY_COMPARE(wv->progress(), 1.0); - QCOMPARE(wv->pressGrabTime(), 200); + QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); + QCOMPARE(wv->property("pressGrabTime").toInt(), 200); QSignalSpy pressGrabTimeSpy(wv, SIGNAL(pressGrabTimeChanged())); - wv->setPressGrabTime(100); - QCOMPARE(wv->pressGrabTime(), 100); + wv->setProperty("pressGrabTime", 100); + QCOMPARE(wv->property("pressGrabTime").toInt(), 100); QCOMPARE(pressGrabTimeSpy.count(),1); - wv->setPressGrabTime(100); + wv->setProperty("pressGrabTime", 100); QCOMPARE(pressGrabTimeSpy.count(),1); - wv->setPressGrabTime(0); + wv->setProperty("pressGrabTime", 0); QCOMPARE(pressGrabTimeSpy.count(),2); } diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml new file mode 100644 index 0000000..be94e00 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Item { + property alias model: model + + WorkerListModel { id: model } + + function workerModifyModel(cmd) { worker.sendMessage({'command': cmd, 'model': model}) } + + WorkerScript { + id: worker + source: "script.js" + } +} diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js new file mode 100644 index 0000000..8ee62b4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js @@ -0,0 +1,6 @@ +WorkerScript.onMessage = function(msg) { + eval("msg.model." + msg.command) + msg.model.sync() +} + + diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro b/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro new file mode 100644 index 0000000..960dbe1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +QT += script +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativeworkerlistmodel.cpp + +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp b/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp new file mode 100644 index 0000000..11a7447 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** 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 <qtest.h> +#include <QtCore/qdebug.h> + +#include <QtDeclarative/qdeclarativecomponent.h> +#include <QtDeclarative/qdeclarativeengine.h> +#include <QtDeclarative/qdeclarativeitem.h> + +#include <private/qdeclarativeworkerscript_p.h> +#include <private/qdeclarativelistmodel_p.h> +#include "../../../shared/util.h" + + + +class tst_QDeclarativeWorkerListModel : public QObject +{ + Q_OBJECT +public: + tst_QDeclarativeWorkerListModel() {} +private slots: + void clear(); + void remove(); + void append(); + void insert(); + void get(); + void set(); + +private: + QByteArray modificationWarning() const { + QString file = QUrl::fromLocalFile(SRCDIR "/data/model.qml").toString(); + return QString("QML WorkerListModel (" + file + ":6:5) List can only be modified from a WorkerScript").toUtf8(); + } + + QDeclarativeEngine m_engine; +}; + +void tst_QDeclarativeWorkerListModel::clear() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QCOMPARE(model->count(), 0); + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + + QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData()); + model->clear(); + QCOMPARE(model->count(), 1); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "clear()"))); + QTRY_COMPARE(model->count(), 0); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerListModel::remove() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + + QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData()); + model->remove(0); + QCOMPARE(model->count(), 1); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "remove(0)"))); + QTRY_COMPARE(model->count(), 0); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerListModel::append() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + + QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData()); + model->append(QScriptValue(1)); + QCOMPARE(model->count(), 1); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerListModel::insert() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "insert(0, {'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + + QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData()); + model->insert(0, QScriptValue(1)); + QCOMPARE(model->count(), 1); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerListModel::get() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + QCOMPARE(model->get(0).property("name").toString(), QString("A")); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerListModel::set() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml"); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create()); + QVERIFY(item != 0); + QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>(); + QVERIFY(model != 0); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})"))); + QTRY_COMPARE(model->count(), 1); + + QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData()); + model->set(0, QScriptValue(1)); + + QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "set(0, {'name': 'Z'})"))); + QTRY_COMPARE(model->get(0).property("name").toString(), QString("Z")); + + qApp->processEvents(); +} + +QTEST_MAIN(tst_QDeclarativeWorkerListModel) + +#include "tst_qdeclarativeworkerlistmodel.moc" + diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script.js b/tests/auto/declarative/qdeclarativeworkerscript/data/script.js new file mode 100644 index 0000000..09199de --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/script.js @@ -0,0 +1,5 @@ +WorkerScript.onMessage = function(msg) { + WorkerScript.sendMessage(msg) +} + + diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml new file mode 100644 index 0000000..1fce155 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml @@ -0,0 +1,24 @@ +import Qt 4.6 + +WorkerScript { + id: worker + source: "script.js" + + property var response + + signal done() + + function testSend(value) { + worker.sendMessage(value) + } + + function compareLiteralResponse(expected) { + var e = eval('(' + expected + ')') + return worker.response == e + } + + onMessage: { + worker.response = messageObject + worker.done() + } +} diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro new file mode 100644 index 0000000..0543ff6 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +QT += script +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativeworkerscript.cpp + +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp new file mode 100644 index 0000000..27ecef4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp @@ -0,0 +1,194 @@ +/**************************************************************************** +** +** 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 <qtest.h> +#include <QtCore/qdebug.h> +#include <QtCore/qtimer.h> +#include <QtScript/qscriptengine.h> + +#include <QtDeclarative/qdeclarativecomponent.h> +#include <QtDeclarative/qdeclarativeengine.h> +#include <QtDeclarative/qdeclarativeitem.h> + +#include <private/qdeclarativeworkerscript_p.h> +#include <private/qdeclarativeengine_p.h> +#include "../../../shared/util.h" + +Q_DECLARE_METATYPE(QScriptValue) + +class tst_QDeclarativeWorkerScript : public QObject +{ + Q_OBJECT +public: + tst_QDeclarativeWorkerScript() {} +private slots: + void source(); + void source_data(); + void messaging(); + void messaging_data(); + void messaging_sendQObjectList(); + void messaging_sendJsObject(); + +private: + void waitForEchoMessage(QDeclarativeWorkerScript *worker) { + QEventLoop loop; + QVERIFY(connect(worker, SIGNAL(done()), &loop, SLOT(quit()))); + QTimer timer; + timer.setSingleShot(true); + connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); + timer.start(10000); + loop.exec(); + QVERIFY(timer.isActive()); + } + + QDeclarativeEngine m_engine; +}; + +void tst_QDeclarativeWorkerScript::source() +{ + QFETCH(QUrl, source); + QFETCH(bool, valid); + + if (!valid) { + QByteArray w = "WorkerScript: Cannot find source file \"" + source.toString().toUtf8() + "\""; + QTest::ignoreMessage(QtWarningMsg, w.constData()); + } + + QDeclarativeComponent component(&m_engine); + component.setData("import Qt 4.6\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl()); + + QDeclarativeWorkerScript *item = qobject_cast<QDeclarativeWorkerScript*>(component.create()); + QVERIFY(item != 0); + + QCOMPARE(item->source(), source); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerScript::source_data() +{ + QTest::addColumn<QUrl>("source"); + QTest::addColumn<bool>("valid"); + + QTest::newRow("valid") << QUrl::fromLocalFile(SRCDIR "/data/worker.qml") << true; + QTest::newRow("invalid") << QUrl::fromLocalFile("asdjfk.js") << false; +} + +void tst_QDeclarativeWorkerScript::messaging() +{ + QFETCH(QVariant, value); + + QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml"); + QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create()); + QVERIFY(worker != 0); + + QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value))); + waitForEchoMessage(worker); + + const QMetaObject *mo = worker->metaObject(); + QCOMPARE(mo->property(mo->indexOfProperty("response")).read(worker).value<QVariant>(), value); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerScript::messaging_data() +{ + QTest::addColumn<QVariant>("value"); + + QTest::newRow("invalid") << QVariant(); + QTest::newRow("bool") << qVariantFromValue(true); + QTest::newRow("int") << qVariantFromValue(1001); + QTest::newRow("real") << qVariantFromValue(10334.323); + QTest::newRow("string") << qVariantFromValue(QString("More cheeeese, Gromit!")); + QTest::newRow("variant list") << qVariantFromValue((QVariantList() << "a" << "b" << "c")); +} + +void tst_QDeclarativeWorkerScript::messaging_sendQObjectList() +{ + // Not allowed to send QObjects other than QDeclarativeWorkerListModelAgent + // instances. If objects are sent in a list, they will be sent as 'undefined' + // js values. + + QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml"); + QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create()); + QVERIFY(worker != 0); + + QVariantList objects; + for (int i=0; i<3; i++) + objects << qVariantFromValue(new QObject(this)); + + QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(objects)))); + waitForEchoMessage(worker); + + const QMetaObject *mo = worker->metaObject(); + QVariantList result = mo->property(mo->indexOfProperty("response")).read(worker).value<QVariantList>(); + QCOMPARE(result, (QVariantList() << QVariant() << QVariant() << QVariant())); + + qApp->processEvents(); +} + +void tst_QDeclarativeWorkerScript::messaging_sendJsObject() +{ + QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml"); + QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create()); + QVERIFY(worker != 0); + + QString jsObject = "{'name': 'zyz', 'spell power': 3101, 'haste': 1125}"; + + QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(worker)); + QScriptValue sv = engine->newObject(); + sv.setProperty("name", "zyz"); + sv.setProperty("spell power", 3101); + sv.setProperty("haste", 1125); + + QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(sv)))); + waitForEchoMessage(worker); + + QVariant result = qVariantFromValue(false); + QVERIFY(QMetaObject::invokeMethod(worker, "compareLiteralResponse", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, jsObject))); + QVERIFY(result.toBool()); + + qApp->processEvents(); +} + +QTEST_MAIN(tst_QDeclarativeWorkerScript) + +#include "tst_qdeclarativeworkerscript.moc" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp index 37d48fa..7dec0ee 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp @@ -1168,7 +1168,7 @@ void tst_qdeclarativexmlhttprequest::redirects() TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirecttarget.html"); - server.serveDirectory("data"); + server.serveDirectory(SRCDIR "/data"); QDeclarativeComponent component(&engine, TEST_FILE("redirects.qml")); QObject *object = component.beginCreate(engine.rootContext()); @@ -1187,7 +1187,7 @@ void tst_qdeclarativexmlhttprequest::redirects() TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirectmissing.html"); - server.serveDirectory("data"); + server.serveDirectory(SRCDIR "/data"); QDeclarativeComponent component(&engine, TEST_FILE("redirectError.qml")); QObject *object = component.beginCreate(engine.rootContext()); @@ -1206,7 +1206,7 @@ void tst_qdeclarativexmlhttprequest::redirects() TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirect.html"); - server.serveDirectory("data"); + server.serveDirectory(SRCDIR "/data"); QDeclarativeComponent component(&engine, TEST_FILE("redirectRecur.qml")); QObject *object = component.beginCreate(engine.rootContext()); diff --git a/tests/auto/declarative/runall.sh b/tests/auto/declarative/runall.sh index 39485d3..62e03e3 100755 --- a/tests/auto/declarative/runall.sh +++ b/tests/auto/declarative/runall.sh @@ -41,37 +41,60 @@ ## ############################################################################/ -Xnest :7 2>/dev/null & -sleep 1 -trap "kill $!" EXIT -export DISPLAY=:7 +if [ "$(uname)" = Linux ] +then + Xnest :7 2>/dev/null & + sleep 1 + trap "kill $!" EXIT + export DISPLAY=:7 + export LANG=en_US + kwin 2>/dev/null & + sleep 1 +fi -( make -k -j1 install 2>&1; - for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p') - do - $exe - done -) | +function filter +{ + exe=$1 + skip=0 while read line do - case "$line" in - make*Error) echo "$line";; - make*Stop) echo "$line";; - make*) ;; - install*) ;; - */qmake*) ;; - */bin/moc*) ;; - *targ.debug*) ;; - g++*) ;; - cd*) ;; - PASS*) ;; - QDEBUG*) ;; - Makefile*) ;; - Config*) ;; - Totals*) ;; - \**) ;; - ./*) ;; - *) echo "$line" - esac + if [ $skip != 0 ] + then + let skip=skip-1 + else + case "$line" in + make*Error) echo "$line";; + make*Stop) echo "$line";; + /*/bin/make*) ;; + make*) ;; + install*) ;; + QDeclarativeDebugServer:*Waiting*) ;; + QDeclarativeDebugServer:*Connection*) ;; + */qmake*) ;; + */bin/moc*) ;; + *targ.debug*) ;; + g++*) ;; + cd*) ;; + XFAIL*) skip=1;; + SKIP*) skip=1;; + PASS*) ;; + QDEBUG*) ;; + Makefile*) ;; + Config*) ;; + Totals*) ;; + \**) ;; + ./*) ;; + *tst_*) echo "$line" ;; + *) echo "$exe: $line" + esac + fi done +} + +make -k -j1 install 2>&1 | filter build +for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p') +do + echo $exe + $exe 2>&1 | filter $exe +done diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml b/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml index 74c6844..3c00ee6 100644 --- a/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml +++ b/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // The WebView size is determined by the width, height, // preferredWidth, and preferredHeight properties. diff --git a/tests/auto/declarative/visual/webview/embedding/nesting.qml b/tests/auto/declarative/visual/webview/embedding/nesting.qml index 0d76579..5e35306 100644 --- a/tests/auto/declarative/visual/webview/embedding/nesting.qml +++ b/tests/auto/declarative/visual/webview/embedding/nesting.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { width: 300 diff --git a/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml index 78d5cfc..6c01382 100644 --- a/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml +++ b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Column { WebView { diff --git a/tests/auto/declarative/visual/webview/javascript/windowObjects.qml b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml index a41de9a..8c52aff 100644 --- a/tests/auto/declarative/visual/webview/javascript/windowObjects.qml +++ b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Column { WebView { diff --git a/tests/auto/declarative/visual/webview/settings/fontFamily.qml b/tests/auto/declarative/visual/webview/settings/fontFamily.qml index 2bb2a53..f547b0e 100644 --- a/tests/auto/declarative/visual/webview/settings/fontFamily.qml +++ b/tests/auto/declarative/visual/webview/settings/fontFamily.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { id: web diff --git a/tests/auto/declarative/visual/webview/settings/fontSize.qml b/tests/auto/declarative/visual/webview/settings/fontSize.qml index b970783..7eaa96b 100644 --- a/tests/auto/declarative/visual/webview/settings/fontSize.qml +++ b/tests/auto/declarative/visual/webview/settings/fontSize.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Grid { columns: 3 diff --git a/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml b/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml index 72e672d..67f1633 100644 --- a/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml +++ b/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Grid { columns: 2 diff --git a/tests/auto/declarative/visual/webview/settings/setFontFamily.qml b/tests/auto/declarative/visual/webview/settings/setFontFamily.qml index 26deed8..823469f 100644 --- a/tests/auto/declarative/visual/webview/settings/setFontFamily.qml +++ b/tests/auto/declarative/visual/webview/settings/setFontFamily.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { url: "test.html" diff --git a/tests/auto/declarative/visual/webview/zooming/pageWidth.qml b/tests/auto/declarative/visual/webview/zooming/pageWidth.qml index 86dd7d2..4a876dd 100644 --- a/tests/auto/declarative/visual/webview/zooming/pageWidth.qml +++ b/tests/auto/declarative/visual/webview/zooming/pageWidth.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { width: 200 diff --git a/tests/auto/declarative/visual/webview/zooming/renderControl.qml b/tests/auto/declarative/visual/webview/zooming/renderControl.qml index 0c8bb3b..49eb91b 100644 --- a/tests/auto/declarative/visual/webview/zooming/renderControl.qml +++ b/tests/auto/declarative/visual/webview/zooming/renderControl.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/visual/webview/zooming/resolution.qml b/tests/auto/declarative/visual/webview/zooming/resolution.qml index a9d4e3a..8542768 100644 --- a/tests/auto/declarative/visual/webview/zooming/resolution.qml +++ b/tests/auto/declarative/visual/webview/zooming/resolution.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { width: 200 * zoomFactor diff --git a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml index 4455b43..c2e9348 100644 --- a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml +++ b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 WebView { width: 200 diff --git a/tests/auto/declarative/visual/webview/zooming/zooming.qml b/tests/auto/declarative/visual/webview/zooming/zooming.qml index 0ea9131..9f0b865 100644 --- a/tests/auto/declarative/visual/webview/zooming/zooming.qml +++ b/tests/auto/declarative/visual/webview/zooming/zooming.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import org.webkit 1.0 // Note that zooming is better done using zoomFactor and careful // control of rendering to avoid excessive re-rendering during diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index a2058cd..f8ecca3 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,8 @@ private slots: void deleteGestureTargetWidget(); void deleteGestureTargetItem_data(); void deleteGestureTargetItem(); + void viewportCoordinates(); + void partialGesturePropagation(); }; tst_Gestures::tst_Gestures() @@ -742,7 +744,6 @@ public: ignoredFinishedGestures.clear(); } -protected: QRectF boundingRect() const { return size; @@ -1771,7 +1772,6 @@ void tst_Gestures::panelStacksBehindParent() void tst_Gestures::deleteGestureTargetWidget() { - } void tst_Gestures::deleteGestureTargetItem_data() @@ -1857,5 +1857,97 @@ 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); +} + +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" diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp index 3745767..12c5843 100644 --- a/tests/auto/headers/tst_headers.cpp +++ b/tests/auto/headers/tst_headers.cpp @@ -271,6 +271,7 @@ void tst_Headers::macros() if (header.endsWith("_p.h") || header.endsWith("_pch.h") || header.contains("global/qconfig-") || header.endsWith("/qconfig.h") || header.contains("/src/tools/") || header.contains("/src/plugins/") + || header.contains("/src/imports/") || header.endsWith("/qiconset.h") || header.endsWith("/qfeatures.h") || header.endsWith("qt_windows.h")) return; 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/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 <QtTest/QtTest> -#include <QtMultimedia/private/qdeclarativeaudio_p.h> +#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h" #include <QtGui/qapplication.h> #include <QtMultimedia/qmediaplayercontrol.h> 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 <QtTest/QtTest> -#include <QtMultimedia/private/qdeclarativevideo_p.h> +#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h" #include <QtGui/qapplication.h> #include <QtMultimedia/qabstractvideosurface.h> 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<QGraphicsItem *> 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" 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<QString *> 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<QString> list; 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 { 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() 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" diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp index 15b6204..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(); @@ -513,6 +514,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() @@ -585,6 +599,8 @@ struct MyType int i1, i2, i3; }; +typedef QString CustomString; + class QtTestCustomObject: public QObject { Q_OBJECT @@ -594,6 +610,9 @@ public: public slots: void sl1(MyType myType); +signals: + void sig_custom(const CustomString &string); + public: int sum; }; @@ -651,6 +670,20 @@ void tst_QMetaObject::invokeMetaConstructor() } } +void tst_QMetaObject::invokeTypedefTypes() +{ + qRegisterMetaType<CustomString>("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<QString>("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<qreal>()); + + qRegisterMetaType<CustomString>("CustomString"); + QCOMPARE(QMetaType::type("CustomString"), ::qMetaTypeId<CustomString>()); + + typedef Whity<double> WhityDouble; + qRegisterMetaType<WhityDouble>("WhityDouble"); + QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId<WhityDouble>()); } 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<PropertyObject::Priority>(object.property("priority")), PropertyObject::Low); object.setProperty("priority", var); QCOMPARE(qVariantValue<PropertyObject::Priority>(object.property("priority")), PropertyObject::High); + + qRegisterMetaType<CustomString>("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() diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp index 7e8ce84..49bddb2 100644 --- a/tests/auto/qprinter/tst_qprinter.cpp +++ b/tests/auto/qprinter/tst_qprinter.cpp @@ -107,6 +107,7 @@ private slots: void printDialogCompleter(); void testCopyCount(); + void testCurrentPage(); void taskQTBUG4497_reusePrinterOnDifferentFiles(); @@ -1005,5 +1006,27 @@ void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles() QCOMPARE(file1.readAll(), file2.readAll()); } +void tst_QPrinter::testCurrentPage() +{ + QPrinter printer; + printer.setFromTo(1, 10); + + // Test set print range + printer.setPrintRange(QPrinter::CurrentPage); + QCOMPARE(printer.printRange(), QPrinter::CurrentPage); + QCOMPARE(printer.fromPage(), 1); + QCOMPARE(printer.toPage(), 10); + + QPrintDialog dialog(&printer); + + // Test default Current Page option to off + QCOMPARE(dialog.isOptionEnabled(QPrintDialog::PrintCurrentPage), false); + + // Test enable Current Page option + dialog.setOption(QPrintDialog::PrintCurrentPage); + QCOMPARE(dialog.isOptionEnabled(QPrintDialog::PrintCurrentPage), true); + +} + QTEST_MAIN(tst_QPrinter) #include "tst_qprinter.moc" 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/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 <QtCore/qvariant.h> #include <QtScript/qscriptvalue.h> -void TestGenerator::save(const QString& data) +void TestGenerator::save(const QHash<QString, QString>& 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<bool>() {return "bool";} template<> QString typeName<QString>() {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<QString>& list) { static const QString templ("void tst_QScriptValue::%1_initData()\n"\ @@ -106,11 +162,14 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list) " initScriptValues();\n"\ "}\n"\ "\n"\ + "static QString %1_array [] = {%2};\n\n"\ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ "{\n"\ " static QSet<QString> %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<QString>& 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<typename T> @@ -154,11 +211,15 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString, " initScriptValues();\n"\ "}\n"\ "\n"\ + "static QString %1_tagArray [] = {%4};\n\n"\ + "static %2 %1_valueArray [] = {%5};\n\n"\ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ "{\n"\ " static QHash<QString, %2> %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<QPair<QString, QString result = templ; typename QList<QPair<QString, T> >::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<QString, T> 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>(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>(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(name, typeName<T>(), set.join(QString())); + return result.arg(name, + typeName<T>(), + QString::number(list.count()), + tagSet.join(QString()), + valueSet.join(QString())); } @@ -200,11 +268,15 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, " initScriptValues();\n"\ "}\n"\ "\n"\ + "static QString %1_tagArray [] = {%3};\n"\ + "static %2 %1_valueArray [] = {%4};\n"\ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ "{\n"\ " static QHash<QString, %2> %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<qsreal>(const QString& name, const QList<QPair<QString, QString result = templ; QList<QPair<QString, qsreal> >::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<QString, qsreal> 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<qsreal>(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<qsreal>(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<qsreal>(const QString& name, const QList<QPair<QString, " return;\n"\ " }\n"; } - return result.arg(name, typeName<qsreal>(), set.join(QString()), hook); + return result.arg(name, + typeName<qsreal>(), + tagSet.join(QString()), + valueSet.join(QString()), + QString::number(list.count()), + hook); } template<typename T> static QString generateCastDef(const QList<QPair<QString, T> >& 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<QString, %2> value;\n"\ + " static QHash<QString, %1> 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<QPair<QString, T> >::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<QString, T> 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>(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>(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(typeName<T>(), set.join(QString())); + return result.arg(typeName<T>(), tagSet.join(QString()), valueSet.join(QString()), QString::number(list.count())); } template<> QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& 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<QString, %2> value;\n"\ + " static QHash<QString, %1> 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<QPair<QString, qsreal> >::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<QString, qsreal> 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<qsreal>(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<qsreal>(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(typeName<qsreal>(), set.join(QString())); + return result.arg(typeName<qsreal>(), + tagSet.join(QString()), + valueSet.join(QString()), + QString::number(list.count())); } static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags) @@ -358,11 +457,14 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS " initScriptValues();\n"\ "}\n"\ "\n"\ + "static QString %1_array [] = {%2};\n\n"\ "void tst_QScriptValue::%1_makeData(const char *expr)\n"\ "{\n"\ " static QSet<QString> 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<QString, QScriptValue>::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<QS QString result = templ; QStringList set; + set.reserve(tags.count()); foreach(const QString& tmp, tags) { - set.append(" equals.insert(\"" + escape(tmp) + "\");"); + set.append("\n \"" + escape(tmp) + "\","); } - return result.arg(comparisionType, set.join("\n")); + return result.arg(comparisionType, set.join(""), QString::number(tags.count())); } static QString generateInitDef(const QVector<QString>& 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<bool>& results, QList<QStr } -QString TestGenerator::generateTest() +QHash<QString, QString> TestGenerator::generateTest() { // All data tags keept in one place. QVector<QString> 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<QString>("toString", toStringList)); - result.append(generateToXXXDef<qsreal>("toNumber", toNumberList)); - result.append(generateToXXXDef<bool>("toBool", toBoolList)); - result.append(generateToXXXDef<bool>("toBoolean", toBooleanList)); - result.append(generateToXXXDef<qsreal>("toInteger", toIntegerList)); - result.append(generateToXXXDef<qint32>("toInt32", toInt32List)); - result.append(generateToXXXDef<quint32>("toUInt32", toUInt32List)); - result.append(generateToXXXDef<quint16>("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<QString, QString> 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<QString>("toString", toStringList)); + tmp.append(generateToXXXDef<qsreal>("toNumber", toNumberList)); + tmp.append(generateToXXXDef<bool>("toBool", toBoolList)); + tmp.append(generateToXXXDef<bool>("toBoolean", toBooleanList)); + tmp.append(generateToXXXDef<qsreal>("toInteger", toIntegerList)); + tmp.append(generateToXXXDef<qint32>("toInt32", toInt32List)); + tmp.append(generateToXXXDef<quint32>("toUInt32", toUInt32List)); + tmp.append(generateToXXXDef<quint16>("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<QString, QString> generateTest(); + void save(const QHash<QString, QString>& data); private: - QFile m_ofile; + QString m_opath; QTemporaryFile m_tempFile; }; 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 <QtScript/qscriptvalue.h> #include <QtTest/QtTest> +#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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isValid_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isBool_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isBoolean_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isNumber_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isFunction_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isNull_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isString_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isUndefined_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isVariant_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isQObject_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isQMetaObject_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isObject_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isDate_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isRegExp_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isArray_makeData(const char* expr) -{ - static QSet<QString> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isError_makeData(const char* expr) -{ - static QSet<QString> 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<QString>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toString_makeData(const char* expr) -{ - static QHash<QString, QString> 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<qsreal>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toNumber_makeData(const char* expr) -{ - static QHash<QString, qsreal> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toBool_makeData(const char* expr) -{ - static QHash<QString, bool> 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<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toBoolean_makeData(const char* expr) -{ - static QHash<QString, bool> 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<qsreal>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toInteger_makeData(const char* expr) -{ - static QHash<QString, qsreal> 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<qint32>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toInt32_makeData(const char* expr) -{ - static QHash<QString, qint32> 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<quint32>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toUInt32_makeData(const char* expr) -{ - static QHash<QString, quint32> 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<quint16>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toUInt16_makeData(const char* expr) -{ - static QHash<QString, quint16> 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<QScriptValue>("other"); - QTest::addColumn<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::equals_makeData(const char *expr) -{ - static QSet<QString> 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<QString, QScriptValue>::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<QScriptValue>("other"); - QTest::addColumn<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::strictlyEquals_makeData(const char *expr) -{ - static QSet<QString> 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<QString, QScriptValue>::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<QScriptValue>("other"); - QTest::addColumn<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::lessThan_makeData(const char *expr) -{ - static QSet<QString> 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<QString, QScriptValue>::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<QScriptValue>("other"); - QTest::addColumn<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::instanceOf_makeData(const char *expr) -{ - static QSet<QString> 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<QString, QScriptValue>::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<QString>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) -{ - static QHash<QString, QString> 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<QString>(value), expected); - QCOMPARE(qscriptvalue_cast<QString>(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castQString) - - -void tst_QScriptValue::qscriptvalue_castqsreal_initData() -{ - QTest::addColumn<qsreal>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) -{ - static QHash<QString, qsreal> 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<qsreal>(value))); - QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value))); - return; - } - if (qIsInf(expected)) { - QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); - QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); - return; - } - QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); - QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) - - -void tst_QScriptValue::qscriptvalue_castbool_initData() -{ - QTest::addColumn<bool>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) -{ - static QHash<QString, bool> 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<bool>(value), expected); - QCOMPARE(qscriptvalue_cast<bool>(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castbool) - - -void tst_QScriptValue::qscriptvalue_castqint32_initData() -{ - QTest::addColumn<qint32>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) -{ - static QHash<QString, qint32> 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<qint32>(value), expected); - QCOMPARE(qscriptvalue_cast<qint32>(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) - - -void tst_QScriptValue::qscriptvalue_castquint32_initData() -{ - QTest::addColumn<quint32>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) -{ - static QHash<QString, quint32> 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<quint32>(value), expected); - QCOMPARE(qscriptvalue_cast<quint32>(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) - - -void tst_QScriptValue::qscriptvalue_castquint16_initData() -{ - QTest::addColumn<quint16>("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) -{ - static QHash<QString, quint16> 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<quint16>(value), expected); - QCOMPARE(qscriptvalue_cast<quint16>(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<QString>("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<QString, QString> 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<QString>(value), expected); + QCOMPARE(qscriptvalue_cast<QString>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castQString) + + +void tst_QScriptValue::qscriptvalue_castqsreal_initData() +{ + QTest::addColumn<qsreal>("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<QString, qsreal> 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<qsreal>(value))); + QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value))); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); + QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); + return; + } + QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); + QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) + + +void tst_QScriptValue::qscriptvalue_castbool_initData() +{ + QTest::addColumn<bool>("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<QString, bool> 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<bool>(value), expected); + QCOMPARE(qscriptvalue_cast<bool>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castbool) + + +void tst_QScriptValue::qscriptvalue_castqint32_initData() +{ + QTest::addColumn<qint32>("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<QString, qint32> 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<qint32>(value), expected); + QCOMPARE(qscriptvalue_cast<qint32>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) + + +void tst_QScriptValue::qscriptvalue_castquint32_initData() +{ + QTest::addColumn<quint32>("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<QString, quint32> 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<quint32>(value), expected); + QCOMPARE(qscriptvalue_cast<quint32>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) + + +void tst_QScriptValue::qscriptvalue_castquint16_initData() +{ + QTest::addColumn<quint16>("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<QString, quint16> 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<quint16>(value), expected); + QCOMPARE(qscriptvalue_cast<quint16>(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<QScriptValue>("other"); + QTest::addColumn<bool>("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<QString> equals; + if (equals.isEmpty()) { + equals.reserve(1217); + for (unsigned i = 0; i < 1217; ++i) + equals.insert(equals_array[i]); + } + QHash<QString, QScriptValue>::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<QScriptValue>("other"); + QTest::addColumn<bool>("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<QString> equals; + if (equals.isEmpty()) { + equals.reserve(523); + for (unsigned i = 0; i < 523; ++i) + equals.insert(strictlyEquals_array[i]); + } + QHash<QString, QScriptValue>::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<QScriptValue>("other"); + QTest::addColumn<bool>("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<QString> equals; + if (equals.isEmpty()) { + equals.reserve(5063); + for (unsigned i = 0; i < 5063; ++i) + equals.insert(lessThan_array[i]); + } + QHash<QString, QScriptValue>::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<QScriptValue>("other"); + QTest::addColumn<bool>("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<QString> equals; + if (equals.isEmpty()) { + equals.reserve(40); + for (unsigned i = 0; i < 40; ++i) + equals.insert(instanceOf_array[i]); + } + QHash<QString, QScriptValue>::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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<bool>("expected"); + initScriptValues(); +} + +static QString isQObject_array [] = { + "engine->newQObject(engine)",}; + +void tst_QScriptValue::isQObject_makeData(const char* expr) +{ + static QSet<QString> 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<bool>("expected"); + initScriptValues(); +} + +static QString isQMetaObject_array [] = { + "engine->newQMetaObject(&QObject::staticMetaObject)",}; + +void tst_QScriptValue::isQMetaObject_makeData(const char* expr) +{ + static QSet<QString> 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<bool>("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<QString> 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<bool>("expected"); + initScriptValues(); +} + +static QString isDate_array [] = { + "engine->evaluate(\"Date.prototype\")", + "engine->newDate(QDateTime())",}; + +void tst_QScriptValue::isDate_makeData(const char* expr) +{ + static QSet<QString> 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<bool>("expected"); + initScriptValues(); +} + +static QString isRegExp_array [] = { + "engine->evaluate(\"/foo/\")",}; + +void tst_QScriptValue::isRegExp_makeData(const char* expr) +{ + static QSet<QString> 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<bool>("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<QString> 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<bool>("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<QString> 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<QString>("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<QString, QString> 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<qsreal>("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<QString, qsreal> 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<bool>("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<QString, bool> 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<bool>("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<QString, bool> 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<qsreal>("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<QString, qsreal> 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<qint32>("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<QString, qint32> 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<quint32>("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<QString, quint32> 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<quint16>("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<QString, quint16> 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) 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<int>("Blah"); + Blah i = { 42 }; + int tp = qRegisterMetaType<Blah>("Blah"); QVariant v = QVariant(tp, &i); - qRegisterMetaTypeStreamOperators<int>("Blah"); + qRegisterMetaTypeStreamOperators<Blah>("Blah"); QCOMPARE(v.userType(), tp); QVERIFY(v.type() == QVariant::UserType); diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro index aa4cc41..5ceaf34 100644 --- a/tests/benchmarks/declarative/binding/binding.pro +++ b/tests/benchmarks/declarative/binding/binding.pro @@ -7,6 +7,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_binding.cpp testtypes.cpp HEADERS += testtypes.h +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" + symbian* { data.sources = data/* data.path = data diff --git a/tests/benchmarks/declarative/binding/data/idproperty.txt b/tests/benchmarks/declarative/binding/data/idproperty.txt index 71e3c4e..4e474ba 100644 --- a/tests/benchmarks/declarative/binding/data/idproperty.txt +++ b/tests/benchmarks/declarative/binding/data/idproperty.txt @@ -1,7 +1,7 @@ import Test 1.0 MyQmlObject { - id: MyObject + id: myObject MyQmlObject { result: ### diff --git a/tests/benchmarks/declarative/binding/data/objectproperty.txt b/tests/benchmarks/declarative/binding/data/objectproperty.txt index 63fa74d..6133dd6 100644 --- a/tests/benchmarks/declarative/binding/data/objectproperty.txt +++ b/tests/benchmarks/declarative/binding/data/objectproperty.txt @@ -1,7 +1,7 @@ import Test 1.0 MyQmlObject { - id: MyObject + id: myObject result: ### } diff --git a/tests/benchmarks/declarative/binding/testtypes.h b/tests/benchmarks/declarative/binding/testtypes.h index 4b103ce..523f94d 100644 --- a/tests/benchmarks/declarative/binding/testtypes.h +++ b/tests/benchmarks/declarative/binding/testtypes.h @@ -50,7 +50,7 @@ class MyQmlObject : public QObject Q_PROPERTY(int result READ result WRITE setResult); Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged); Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged); - Q_PROPERTY(QDeclarativeList<QObject *> *data READ data); + Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data); Q_CLASSINFO("DefaultProperty", "data"); public: MyQmlObject() : m_result(0), m_value(0), m_object(0) {} @@ -61,7 +61,7 @@ public: int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QDeclarativeList<QObject *> *data() { return &m_data; } + QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } @@ -71,7 +71,7 @@ signals: void objectChanged(); private: - QDeclarativeConcreteList<QObject *> m_data; + QList<QObject *> m_data; int m_result; int m_value; MyQmlObject *m_object; diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp index ee529a7..dbddac3 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/declarative/binding/tst_binding.cpp @@ -103,8 +103,8 @@ void tst_binding::objectproperty_data() QTest::addColumn<QString>("file"); QTest::addColumn<QString>("binding"); - QTest::newRow("object.value") << "data/objectproperty.txt" << "object.value"; - QTest::newRow("object.value + 10") << "data/objectproperty.txt" << "object.value + 10"; + QTest::newRow("object.value") << SRCDIR "/data/objectproperty.txt" << "object.value"; + QTest::newRow("object.value + 10") << SRCDIR "/data/objectproperty.txt" << "object.value + 10"; } void tst_binding::objectproperty() @@ -132,13 +132,13 @@ void tst_binding::basicproperty_data() QTest::addColumn<QString>("file"); QTest::addColumn<QString>("binding"); - QTest::newRow("value") << "data/localproperty.txt" << "value"; - QTest::newRow("value + 10") << "data/localproperty.txt" << "value + 10"; - QTest::newRow("value + value + 10") << "data/localproperty.txt" << "value + value + 10"; + QTest::newRow("value") << SRCDIR "/data/localproperty.txt" << "value"; + QTest::newRow("value + 10") << SRCDIR "/data/localproperty.txt" << "value + 10"; + QTest::newRow("value + value + 10") << SRCDIR "/data/localproperty.txt" << "value + value + 10"; - QTest::newRow("MyObject.value") << "data/idproperty.txt" << "MyObject.value"; - QTest::newRow("MyObject.value + 10") << "data/idproperty.txt" << "MyObject.value + 10"; - QTest::newRow("MyObject.value + MyObject.value + 10") << "data/idproperty.txt" << "MyObject.value + MyObject.value + 10"; + QTest::newRow("myObject.value") << SRCDIR "/data/idproperty.txt" << "myObject.value"; + QTest::newRow("myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + 10"; + QTest::newRow("myObject.value + myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + myObject.value + 10"; } void tst_binding::basicproperty() diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 9c0fd27..4319208 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -42,7 +42,7 @@ #include <qtest.h> #include <QDeclarativeEngine> #include <QDeclarativeComponent> -#include <QDeclarativeMetaType> +#include <private/qdeclarativemetatype_p.h> #include <QDebug> #include <QGraphicsScene> #include <QGraphicsItem> @@ -339,7 +339,8 @@ void tst_creation::itemtree_data_cpp() for (int i = 0; i < 30; ++i) { QDeclarativeItem *child = new QDeclarativeItem; QDeclarativeGraphics_setParent_noEvent(child,item); - item->data()->append(child); + QDeclarativeListReference ref(item, "data"); + ref.append(child); } delete item; } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml index 69114af..dc29f15 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml @@ -1,6 +1,6 @@ import Qt 4.6 QtObject { - id: Blah + id: blah } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml index 723e62a..e48194a 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml @@ -7,8 +7,8 @@ Item { id:block property int targetX: 0 property int targetY: 0 - x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } - y: SpringFollow { source: targetY; spring: 2; damping: 0.2 } + SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } + SpringFollow on y { source: targetY; spring: 2; damping: 0.2 } Image { id: img source: { @@ -21,7 +21,7 @@ Item { id:block } } opacity: 0 - opacity: Behavior { NumberAnimation { duration: 200 } } + Behavior on opacity { NumberAnimation { duration: 200 } } anchors.fill: parent } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro index 12fa9f4..30ef235 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -7,6 +7,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp HEADERS += testtypes.h +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" + symbian* { data.sources = data/* data.path = data diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h index 4b103ce..523f94d 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h +++ b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h @@ -50,7 +50,7 @@ class MyQmlObject : public QObject Q_PROPERTY(int result READ result WRITE setResult); Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged); Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged); - Q_PROPERTY(QDeclarativeList<QObject *> *data READ data); + Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data); Q_CLASSINFO("DefaultProperty", "data"); public: MyQmlObject() : m_result(0), m_value(0), m_object(0) {} @@ -61,7 +61,7 @@ public: int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QDeclarativeList<QObject *> *data() { return &m_data; } + QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } @@ -71,7 +71,7 @@ signals: void objectChanged(); private: - QDeclarativeConcreteList<QObject *> m_data; + QList<QObject *> m_data; int m_result; int m_value; MyQmlObject *m_object; diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index 7065303..4b1456e 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -90,13 +90,13 @@ void tst_qmlcomponent::creation_data() { QTest::addColumn<QString>("file"); - QTest::newRow("Object") << "data/object.qml"; - QTest::newRow("Object - Id") << "data/object_id.qml"; - QTest::newRow("MyQmlObject") << "data/myqmlobject.qml"; - QTest::newRow("MyQmlObject: basic binding") << "data/myqmlobject_binding.qml"; - QTest::newRow("Synthesized properties") << "data/synthesized_properties.qml"; - QTest::newRow("Synthesized properties.2") << "data/synthesized_properties.2.qml"; - QTest::newRow("SameGame - BoomBlock") << "data/samegame/BoomBlock.qml"; + QTest::newRow("Object") << SRCDIR "/data/object.qml"; + QTest::newRow("Object - Id") << SRCDIR "/data/object_id.qml"; + QTest::newRow("MyQmlObject") << SRCDIR "/data/myqmlobject.qml"; + QTest::newRow("MyQmlObject: basic binding") << SRCDIR "/data/myqmlobject_binding.qml"; + QTest::newRow("Synthesized properties") << SRCDIR "/data/synthesized_properties.qml"; + QTest::newRow("Synthesized properties.2") << SRCDIR "/data/synthesized_properties.2.qml"; + QTest::newRow("SameGame - BoomBlock") << SRCDIR "/data/samegame/BoomBlock.qml"; } void tst_qmlcomponent::creation() diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro index 8070768..79fdd26 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro @@ -6,3 +6,5 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativemetaproperty.cpp +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp index dae1751..8a5f4ae 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp @@ -42,7 +42,7 @@ #include <qtest.h> #include <QDeclarativeEngine> #include <QDeclarativeComponent> -#include <QDeclarativeMetaProperty> +#include <QDeclarativeProperty> #include <QFile> #include <QDebug> @@ -89,8 +89,8 @@ void tst_qmlmetaproperty::lookup_data() { QTest::addColumn<QString>("file"); - QTest::newRow("Simple Object") << "data/object.qml"; - QTest::newRow("Synthesized Object") << "data/synthesized_object.qml"; + QTest::newRow("Simple Object") << SRCDIR "/data/object.qml"; + QTest::newRow("Synthesized Object") << SRCDIR "/data/synthesized_object.qml"; } void tst_qmlmetaproperty::lookup() @@ -103,7 +103,7 @@ void tst_qmlmetaproperty::lookup() QObject *obj = c.create(); QBENCHMARK { - QDeclarativeMetaProperty p(obj, "x"); + QDeclarativeProperty p(obj, "x"); } delete obj; diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/declarative/script/tst_script.cpp index 61f5fc8..9dd4076 100644 --- a/tests/benchmarks/declarative/script/tst_script.cpp +++ b/tests/benchmarks/declarative/script/tst_script.cpp @@ -96,11 +96,6 @@ private slots: private: }; -void tst_script::initTestCase() -{ - QML_REGISTER_TYPE(Qt.test, 1, 0, TestObject, TestObject); -} - inline QUrl TEST_FILE(const QString &filename) { return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); @@ -147,6 +142,12 @@ int TestObject::x() return m_x++; } +void tst_script::initTestCase() +{ + QML_REGISTER_TYPE(Qt.test, 1, 0, TestObject, TestObject); +} + + #define PROPERTY_PROGRAM \ "(function(testObject) { return (function() { " \ " var test = 0; " \ 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(); 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() 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; } 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)); } diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp index 2c5efbf..5292f5f 100644 --- a/tools/designer/src/lib/shared/formwindowbase.cpp +++ b/tools/designer/src/lib/shared/formwindowbase.cpp @@ -72,6 +72,7 @@ #include <QtGui/QStatusBar> #include <QtGui/QMenu> #include <QtGui/QAction> +#include <QtGui/QLabel> QT_BEGIN_NAMESPACE @@ -181,7 +182,17 @@ void FormWindowBase::reloadProperties() QMapIterator<int, bool> 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<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { + const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(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<QTabWidget *>(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 }; 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 <QtDesigner/QExtensionFactory> +#include <QtDesigner/QExtensionManager> + +#include <QtCore/qplugin.h> +#include <QtDeclarative/QDeclarativeView> + +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("\ + <ui language=\"c++\">\ + <widget class=\"QDeclarativeView\" name=\"declarativeView\">\ + <property name=\"geometry\">\ + <rect>\ + <x>0</x>\ + <y>0</y>\ + <width>300</width>\ + <height>200</height>\ + </rect>\ + </property>\ + </widget>\ + </ui>"); +} + +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 <QtDesigner/QDesignerCustomWidgetInterface> + +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 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 <QtCore> #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 <stdlib.h> + 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 <QtCore> +#include <QDir> +#include <QVariant> +#include <QFile> +#include <QTemporaryFile> +#include <QTextStream> #include "archiveextractor.h" #include "config.h" diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 021d64a..6884781 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -43,11 +43,11 @@ cppcodeparser.cpp */ -#include <QtCore> #include <qfile.h> #include <stdio.h> #include <errno.h> +#include <qdebug.h> #include "codechunk.h" #include "config.h" @@ -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) { @@ -1651,8 +1651,9 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) */ QString namespaceName = previousLexeme(); NamespaceNode *namespasse = 0; - if (parent) + if (parent) { namespasse = static_cast<NamespaceNode*>(parent->findNode(namespaceName, Node::Namespace)); + } if (!namespasse) { namespasse = new NamespaceNode(parent, namespaceName); namespasse->setAccess(access); 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 <QSet> #include <QString> +#include <QMap> #include "location.h" diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 6a8899a..c8a39ef 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -42,7 +42,6 @@ /* generator.cpp */ -#include <QtCore> #include <qdir.h> #include <qdebug.h> #include "codemarker.h" @@ -1186,6 +1185,31 @@ void Generator::appendSortedNames(Text& text, } } +void Generator::appendSortedQmlNames(Text& text, + const Node* base, + const NodeList& subs, + CodeMarker *marker) +{ + QMap<QString,Text> classMap; + int index = 0; + + qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by..."; + for (int i = 0; i < subs.size(); ++i) { + Text t; + qDebug() << " " << subs[i]->name(); + appendFullName(t, subs[i], base, marker); + classMap[t.toString().toLower()] = t; + } + + 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<RelatedClass> &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/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 <QtXml> #include <QHash> #include <QMap> 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<Section> sections; QList<Section>::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() << "<h3>" << protectEnc((*s).name) << "</h3>\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() << "<a href=\"" << linkForNode(it.value(), relative) << "\">"; - 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() << "</a>"; 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<FunctionNode *>(*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<QString,QString> 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<const QmlClassNode*>(n); - out() << "<p style=\"text-align: center\">"; - 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() << "</p>"; - } - } -#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/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 <QtXml> - #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 <qglobal.h> -#include <QtCore> #include <stdlib.h> #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<QTranslator *> 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<QString> 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 358fdd1..5415559 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -43,8 +43,8 @@ node.cpp */ -#include <QtCore> #include "node.h" +#include <qdebug.h> QT_BEGIN_NAMESPACE @@ -1161,7 +1161,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(" "))); } /*! @@ -1257,7 +1258,7 @@ bool TargetNode::isInnerNode() const #ifdef QDOC_QML bool QmlClassNode::qmlOnly = false; -QMultiMap<QString,QString> QmlClassNode::inheritedBy; +QMultiMap<QString,Node*> QmlClassNode::inheritedBy; /*! Constructs a Qml class node (i.e. a Fake node with the @@ -1302,19 +1303,23 @@ 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)) + if (inheritedBy.count(base) > 0) { subs = inheritedBy.values(base); + qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base + << "subs:" << subs.size(); + } } /*! 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<QString,QString> inheritedBy; + static QMultiMap<QString,Node*> inheritedBy; private: const ClassNode* cnode; 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 <QtCore> #include <qfile.h> #include <qfileinfo.h> @@ -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/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 \ 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 <QtCore> #include <QDomDocument> #include "atom.h" @@ -54,6 +53,8 @@ #include "text.h" #include "tree.h" +#include <limits.h> + 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 <QtXml> - #include "codemarker.h" #include "pagegenerator.h" #include "webxmlgenerator.h" @@ -52,6 +50,8 @@ #include "separator.h" #include "tree.h" +#include <QtCore/qxmlstream.h> + 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 <QtCore/qxmlstream.h> + #include "codemarker.h" #include "config.h" #include "pagegenerator.h" QT_BEGIN_NAMESPACE +class QXmlStreamReader; +class QXmlStreamWriter; + class WebXMLGenerator : public PageGenerator { public: 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 diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 6339813..a4de339 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -311,8 +311,11 @@ int main(int argc, char ** argv) usage(); } + viewer.addLibraryPath(QCoreApplication::applicationDirPath()); + foreach (QString lib, libraries) viewer.addLibraryPath(lib); + viewer.setNetworkCacheSize(cache); viewer.setRecordFile(recordfile); if (resizeview) diff --git a/tools/qml/qfxtester.h b/tools/qml/qfxtester.h index 1a9f077..6521409 100644 --- a/tools/qml/qfxtester.h +++ b/tools/qml/qfxtester.h @@ -54,12 +54,12 @@ QT_BEGIN_NAMESPACE class QDeclarativeVisualTest : public QObject { Q_OBJECT - Q_PROPERTY(QList<QObject *>* events READ events CONSTANT) + Q_PROPERTY(QDeclarativeListProperty<QObject> events READ events CONSTANT) Q_CLASSINFO("DefaultProperty", "events") public: QDeclarativeVisualTest() {} - QList<QObject *> *events() { return &m_events; } + QDeclarativeListProperty<QObject> events() { return QDeclarativeListProperty<QObject>(this, m_events); } int count() const { return m_events.count(); } QObject *event(int idx) { return m_events.at(idx); } |