summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.exebin1178112 -> 1178112 bytes
-rw-r--r--dist/changes-4.6.224
-rw-r--r--doc/src/getting-started/examples.qdoc4
-rw-r--r--doc/src/getting-started/known-issues.qdoc4
-rw-r--r--doc/src/platforms/platform-notes.qdoc2
-rw-r--r--examples/network/googlesuggest/googlesuggest.cpp3
-rw-r--r--examples/network/googlesuggest/searchbox.cpp3
-rw-r--r--examples/network/network-chat/chatdialog.cpp2
-rw-r--r--examples/network/network-chat/client.cpp4
-rw-r--r--examples/network/network-chat/connection.cpp6
-rw-r--r--examples/network/network-chat/peermanager.cpp2
-rw-r--r--examples/network/qftp/ftpwindow.cpp3
-rw-r--r--examples/network/securesocketclient/sslclient.cpp2
-rw-r--r--examples/network/torrent/trackerclient.cpp2
-rw-r--r--examples/webkit/framecapture/framecapture.pro2
-rw-r--r--examples/webkit/simpleselector/simpleselector.pro2
-rw-r--r--mkspecs/common/symbian/symbian.conf19
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog73
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp104
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog95
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp69
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc15
-rw-r--r--src/corelib/io/qdebug.h2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp41
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp8
-rw-r--r--src/corelib/plugin/qlibrary.cpp1
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/gui/dialogs/qprintdialog.h6
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp5
-rw-r--r--src/gui/kernel/kernel.pri53
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp209
-rw-r--r--src/gui/kernel/qsoftkeymanager_common_p.h82
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h22
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp366
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60_p.h109
-rw-r--r--src/gui/kernel/qt_s60_p.h6
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp9
-rw-r--r--src/gui/styles/qmacstyle_mac.mm23
-rw-r--r--src/gui/styles/qs60style.cpp16
-rw-r--r--src/gui/text/qfontengine_s60.cpp68
-rw-r--r--src/gui/text/qfontengine_s60_p.h10
-rw-r--r--src/gui/widgets/qmainwindow.cpp2
-rw-r--r--src/gui/widgets/qmenu_p.h7
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp34
-rw-r--r--src/gui/widgets/qmenubar.cpp2
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp6
-rw-r--r--src/network/access/qhttpnetworkheader.cpp2
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp2
-rw-r--r--src/network/kernel/qauthenticator.cpp4
-rw-r--r--src/network/kernel/qnetworkinterface.cpp4
-rw-r--r--src/network/socket/qlocalserver.cpp10
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp10
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp14
-rw-r--r--src/network/ssl/qsslcertificate.cpp4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp2
-rw-r--r--src/openvg/qpixmapdata_vg.cpp94
-rw-r--r--src/s60installs/bwins/QtGuiu.def4
-rw-r--r--src/s60installs/eabi/QtGuiu.def4
-rw-r--r--src/s60installs/s60installs.pro4
-rw-r--r--src/s60installs/sqlite3.sisbin286192 -> 286452 bytes
-rw-r--r--src/tools/rcc/rcc.cpp2
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp3
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp45
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro4
-rw-r--r--tests/auto/qscriptvalue/testgen/data.txt116
-rwxr-xr-xtests/auto/qscriptvalue/testgen/gen.py219
-rw-r--r--tests/auto/qscriptvalue/testgen/main.cpp62
-rw-r--r--tests/auto/qscriptvalue/testgen/testgen.pro18
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.cpp688
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.h77
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp160
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h410
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp6369
-rw-r--r--tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro1
-rw-r--r--tests/benchmarks/benchmarks.pro1
-rw-r--r--tests/benchmarks/qfontmetrics/main.cpp112
-rw-r--r--tests/benchmarks/qfontmetrics/qfontmetrics.pro5
-rw-r--r--tests/benchmarks/qscriptengine/qscriptengine.pro5
-rw-r--r--tests/benchmarks/qscriptengine/tst_qscriptengine.cpp5
-rw-r--r--tests/benchmarks/qstring/main.cpp6
-rw-r--r--tests/benchmarks/qstring/qstring.pro6
-rw-r--r--tests/benchmarks/qtext/main.cpp10
-rw-r--r--tests/benchmarks/qtext/qtext.pro9
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp20
-rw-r--r--tools/configure/configureapp.cpp9
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp4
-rw-r--r--tools/designer/src/components/propertyeditor/designerpropertymanager.h2
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp4
-rw-r--r--tools/designer/src/designer/qdesigner_server.cpp6
-rw-r--r--tools/designer/src/designer/qdesigner_server.h2
-rw-r--r--tools/designer/src/lib/shared/actioneditor.cpp2
-rw-r--r--tools/designer/src/lib/shared/actionrepository.cpp2
-rw-r--r--tools/designer/src/lib/shared/connectionedit_p.h2
-rw-r--r--tools/designer/src/lib/shared/filterwidget_p.h2
-rw-r--r--tools/designer/src/lib/shared/iconloader.cpp2
-rw-r--r--tools/designer/src/lib/shared/iconselector_p.h2
-rw-r--r--tools/designer/src/lib/shared/plugindialog.cpp4
-rw-r--r--tools/designer/src/lib/shared/qdesigner_introspection.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_objectinspector_p.h2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h14
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbar.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_utils_p.h8
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widgetbox_p.h2
-rw-r--r--tools/designer/src/lib/shared/qtresourceview_p.h4
-rw-r--r--tools/designer/src/lib/shared/richtexteditor_p.h2
-rw-r--r--tools/designer/src/lib/shared/shared_settings.cpp2
-rw-r--r--tools/designer/src/lib/shared/textpropertyeditor_p.h2
-rw-r--r--tools/designer/src/lib/shared/widgetdatabase_p.h6
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp2
-rw-r--r--tools/designer/src/lib/uilib/formbuilder.cpp2
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h2
-rw-r--r--tools/designer/src/plugins/activeqt/qdesigneraxwidget.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h12
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h2
-rw-r--r--tools/shared/findwidget/texteditfindwidget.h2
-rw-r--r--tools/shared/fontpanel/fontpanel.cpp2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientutils.cpp2
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.h4
-rw-r--r--util/s60pixelmetrics/pixel_metrics.cpp21
153 files changed, 9778 insertions, 576 deletions
diff --git a/configure.exe b/configure.exe
index e64af40..21fdcfa 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2
index d35f945..4f46a1f 100644
--- a/dist/changes-4.6.2
+++ b/dist/changes-4.6.2
@@ -85,6 +85,12 @@ QtXml
- foo
* bar
+QtMultimedia
+------------
+
+ - QAudioInput
+ * [QTBUG-7044]: QAudioInput stopped working correctly after suspend()/resume() on linux.
+
Qt Plugins
----------
@@ -110,7 +116,8 @@ Qt for Unix (X11 and Mac OS X)
Qt for Linux/X11
----------------
-
+ * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in Qt/X11.
-
Qt for Windows
@@ -130,7 +137,13 @@ Qt for Embedded Linux
DirectFB
--------
-
+ * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in DirectFB.
+ * Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes
+ QPixmap::scroll
+ * Fix a rendering issue for semi-transparent top level windows in DirectFB.
+ * Make it possible to fall back to the raster engine for stretch blits in
+ DirectFB using QT_NO_DIRECTFB_STRETCHBLIT
-
Qt for Windows CE
@@ -143,7 +156,12 @@ Qt for Windows CE
****************************************************************************
- Designer
- * foo
+ * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties
+ * [QTBUG-6757] Fixed bug where selection handles would be affected by
+ a style sheet set on the main form.
+
+ - uic3
+ * [QTBUG-7404] Added option to preserve layout names set by Qt 3 Designer.
- qdoc3
* bar
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 6b4ec61..0c18773 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -406,7 +406,7 @@
\clearfloat
\section1 \l{D-Bus Examples}{D-Bus}
\beginfloatleft
- \l{D-Bus Examples}{\inlineimage qt-embedded-examples.png
+ \l{D-Bus Examples}{\inlineimage dbus-examples.png
}
\endfloat
@@ -416,7 +416,7 @@
\clearfloat
\section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux}
\beginfloatleft
- \l{Qt for Embedded Linux Examples}{\inlineimage dbus-examples.png
+ \l{Qt for Embedded Linux Examples}{\inlineimage qt-embedded-examples.png
}
\endfloat
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 5503ab9..b73e15d 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -52,7 +52,7 @@
on the Qt website.
An overview of known issues may also be found at:
- \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}
+ \l{http://qt.gitorious.org/qt/pages/QtKnownIssues}
{Known Issues Wiki}.
\section1 Installation Issues
@@ -160,6 +160,6 @@
\list
\o Check known issues for Symbian at
- \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues} {Known Issues Wiki}.
+ \l{http://qt.gitorious.org/qt/pages/QtKnownIssues} {Known Issues Wiki}.
\endlist
*/
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 6ea3df4..e08bf1a 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -490,7 +490,7 @@
\section1 Known Issues
Known issues can be found by visiting the
- \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}{wiki page} with an
+ \l{http://qt.gitorious.org/qt/pages/QtKnownIssues}{wiki page} with an
up-to-date list of known issues, and the list of bugs can be found by
\l{http://bugreports.qt.nokia.com/browse/QTBUG/component/19171}{browsing} the
S60 component in Qt's public task tracker, located at
diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp
index 79bc448..0c85773 100644
--- a/examples/network/googlesuggest/googlesuggest.cpp
+++ b/examples/network/googlesuggest/googlesuggest.cpp
@@ -231,4 +231,5 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply)
networkReply->deleteLater();
}
-//! [9] \ No newline at end of file
+//! [9]
+
diff --git a/examples/network/googlesuggest/searchbox.cpp b/examples/network/googlesuggest/searchbox.cpp
index 69dc20e..8ef6f00 100644
--- a/examples/network/googlesuggest/searchbox.cpp
+++ b/examples/network/googlesuggest/searchbox.cpp
@@ -69,4 +69,5 @@ void SearchBox::doSearch()
QString url = QString(GSEARCH_URL).arg(text());
QDesktopServices::openUrl(QUrl(url));
}
-//! [2] \ No newline at end of file
+//! [2]
+
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
index d8bcb30..da65270 100644
--- a/examples/network/network-chat/chatdialog.cpp
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -79,7 +79,7 @@ void ChatDialog::appendMessage(const QString &from, const QString &message)
QTextCursor cursor(textEdit->textCursor());
cursor.movePosition(QTextCursor::End);
QTextTable *table = cursor.insertTable(1, 2, tableFormat);
- table->cellAt(0, 0).firstCursorPosition().insertText("<" + from + "> ");
+ table->cellAt(0, 0).firstCursorPosition().insertText('<' + from + "> ");
table->cellAt(0, 1).firstCursorPosition().insertText(message);
QScrollBar *bar = textEdit->verticalScrollBar();
bar->setValue(bar->maximum());
diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp
index 2b8725c..f516783 100644
--- a/examples/network/network-chat/client.cpp
+++ b/examples/network/network-chat/client.cpp
@@ -69,8 +69,8 @@ void Client::sendMessage(const QString &message)
QString Client::nickName() const
{
- return QString(peerManager->userName()) + "@" + QHostInfo::localHostName()
- + ":" + QString::number(server.serverPort());
+ return QString(peerManager->userName()) + '@' + QHostInfo::localHostName()
+ + ':' + QString::number(server.serverPort());
}
bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const
diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp
index 1df8a2d..5c636b9 100644
--- a/examples/network/network-chat/connection.cpp
+++ b/examples/network/network-chat/connection.cpp
@@ -83,7 +83,7 @@ bool Connection::sendMessage(const QString &message)
return false;
QByteArray msg = message.toUtf8();
- QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg;
+ QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + ' ' + msg;
return write(data) == data.size();
}
@@ -118,7 +118,7 @@ void Connection::processReadyRead()
return;
}
- username = QString(buffer) + "@" + peerAddress().toString() + ":"
+ username = QString(buffer) + '@' + peerAddress().toString() + ':'
+ QString::number(peerPort());
currentDataType = Undefined;
numBytesForCurrentDataType = 0;
@@ -162,7 +162,7 @@ void Connection::sendPing()
void Connection::sendGreetingMessage()
{
QByteArray greeting = greetingMessage.toUtf8();
- QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + " " + greeting;
+ QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + ' ' + greeting;
if (write(data) == data.size())
isGreetingMessageSent = true;
}
diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp
index 5ad2dc7..430031b 100644
--- a/examples/network/network-chat/peermanager.cpp
+++ b/examples/network/network-chat/peermanager.cpp
@@ -61,7 +61,7 @@ PeerManager::PeerManager(Client *client)
foreach (QString string, envVariables) {
int index = environment.indexOf(QRegExp(string));
if (index != -1) {
- QStringList stringList = environment.at(index).split("=");
+ QStringList stringList = environment.at(index).split('=');
if (stringList.size() == 2) {
username = stringList.at(1).toUtf8();
break;
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index ae3a2b6..3fd62f8 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -324,7 +324,8 @@ void FtpWindow::processItem(QTreeWidgetItem *item, int /*column*/)
if (isDirectory.value(name)) {
fileList->clear();
isDirectory.clear();
- currentPath += "/" + name;
+ currentPath += '/';
+ currentPath += name;
ftp->cd(name);
ftp->list();
cdToParentButton->setEnabled(true);
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index 1422f1c..0d6a581 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -177,7 +177,7 @@ void SslClient::socketReadyRead()
void SslClient::sendData()
{
QString input = form->sessionInput->text();
- appendString(input + "\n");
+ appendString(input + '\n');
socket->write(input.toUtf8() + "\r\n");
form->sessionInput->clear();
}
diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp
index 4f23d54..2397737 100644
--- a/examples/network/torrent/trackerclient.cpp
+++ b/examples/network/torrent/trackerclient.cpp
@@ -105,7 +105,7 @@ void TrackerClient::fetchPeerList()
QString passkey = "?";
if (fullUrl.contains("?passkey")) {
passkey = metaInfo.announceUrl().mid(fullUrl.indexOf("?passkey"), -1);
- passkey += "&";
+ passkey += '&';
}
// Percent encode the hash
diff --git a/examples/webkit/framecapture/framecapture.pro b/examples/webkit/framecapture/framecapture.pro
index 6f2f093..11960b9 100644
--- a/examples/webkit/framecapture/framecapture.pro
+++ b/examples/webkit/framecapture/framecapture.pro
@@ -1,4 +1,4 @@
-QT += webkit
+QT += webkit network
HEADERS = framecapture.h
SOURCES = main.cpp \
diff --git a/examples/webkit/simpleselector/simpleselector.pro b/examples/webkit/simpleselector/simpleselector.pro
index acd0ae7..3ddd6db 100644
--- a/examples/webkit/simpleselector/simpleselector.pro
+++ b/examples/webkit/simpleselector/simpleselector.pro
@@ -1,4 +1,4 @@
-QT += webkit
+QT += webkit network
FORMS = window.ui
HEADERS = window.h
SOURCES = main.cpp \
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index b5d12fb..7162bad 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -30,6 +30,7 @@ QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS.CW =
QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
@@ -69,7 +70,7 @@ QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource
+QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource -lfbscli -lbitgdi -lgdi
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon
@@ -147,19 +148,3 @@ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis
MMP_RULES -= PAGED
}
}
-
-QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
-# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
-
-symbian {
- armfpu = $$find(MMP_RULES, "ARMFPU")
- !isEmpty(armfpu) {
- vfpv2 = $$find(MMP_RULES, "vfpv2")
- !isEmpty(vfpv2) {
- # we will respect fpu setting obtained from configure, but,
- # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode
- QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC}
- # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE}
- }
- }
-}
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 221c020..c304876 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1
+ 69dd29fbeb12d076741dce70ac6bc155101ccd6f
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index fd5606b..18d119a 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,76 @@
+2010-02-01 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the fallback style on Maemo 5
+
+ https://bugs.webkit.org/show_bug.cgi?id=34376
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::fallbackStyle):
+ (WebCore::RenderThemeQt::qStyle):
+ (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
+ * platform/qt/RenderThemeQt.h:
+
+2010-01-29 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Speed up the WebCore::String -> QString conversion
+
+ Use QString(const QChar *, int len) constructor instead of QString::fromUtf16 to
+ avoid BOM checks and byteswapping.
+
+ * bridge/qt/qt_class.cpp:
+ (JSC::Bindings::QtClass::fieldNamed):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+
+2010-01-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable scrolling optimization for pages with embedded widgets
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ Added a basic manual test for scrolling of embedded QWidgets.
+
+ * manual-tests/qt/qtplugin-scrolling.html: Added.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::setParent):
+ * platform/ScrollView.h:
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformInit):
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::invalidateRect):
+
+2010-01-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Turn off websocket support by default for Qt 4.6.x
+ https://bugs.webkit.org/show_bug.cgi?id=34284
+
+ * WebCore.pro:
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ Remove the manual test case in favor of an automated
+ test case in WebKit/qt/tests/qwebpage.
+
+ * manual-tests/qt/java-script-prompt.html: Removed.
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index bf4d6f9..7b0366d 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -6,6 +6,7 @@ symbian: {
TARGET.EPOCALLOWDLLDATA=1
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
TARGET.CAPABILITY = All -Tcb
+ TARGET.UID3 = 0x200267C2
webkitlibs.sources = QtWebKit.dll
webkitlibs.path = /sys/bin
@@ -23,7 +24,6 @@ symbian: {
DEPLOYMENT += webkitlibs webkitbackup
- TARGET.UID3 = 0x200267C2
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
@@ -186,7 +186,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
}
# Web Socket support.
-!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=0
# XSLT support with QtXmlPatterns
!contains(DEFINES, ENABLE_XSLT=.) {
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
index c39b3af..09a1544 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
@@ -127,7 +127,7 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
QObject* obj = qtinst->getObject();
UString ustring = identifier.ustring();
- QString objName(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ QString objName((const QChar*)ustring.rep()->data(), ustring.size());
QByteArray ba = objName.toAscii();
// First check for a cached field
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 6887325..ee7aa1a 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -305,7 +305,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
return QString();
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()));
if (type == String)
dist = 0;
else
@@ -329,7 +329,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
QVariant v = convertValueToQVariant(exec, val, QMetaType::Void, &objdist, visitedObjects);
if (objdist >= 0) {
UString ustring = (*it).ustring();
- QString id = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString id = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.insert(id, v);
}
}
@@ -404,7 +404,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = rtarray->getConcreteArray()->valueAt(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -418,7 +418,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = array->get(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -427,7 +427,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
} else {
// Make a single length array
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QStringList result;
result.append(qstring);
ret = QVariant(result);
@@ -443,7 +443,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
dist = 0;
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()).toLatin1());
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()).toLatin1());
if (type == String)
dist = 5;
else
@@ -485,7 +485,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
if (hint == QMetaType::QDateTime) {
QDateTime dt = QDateTime::fromString(qstring, Qt::ISODate);
@@ -534,7 +534,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
*/
// Attempt to convert.. a bit risky
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
// this is of the form '/xxxxxx/i'
int firstSlash = qstring.indexOf(QLatin1Char('/'));
@@ -554,7 +554,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QRegExp re(qstring);
if (re.isValid()) {
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index 12edc42..d270e37 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -216,7 +216,6 @@
#include "JSWebKitCSSTransformValue.h"
#include "JSWebKitPoint.h"
#include "JSWebKitTransitionEvent.h"
-#include "JSWebSocket.h"
#include "JSWheelEvent.h"
#include "JSWorker.h"
#include "JSXMLHttpRequest.h"
@@ -247,7 +246,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow);
/* Hash table */
-static const HashTableValue JSDOMWindowTableValues[297] =
+static const HashTableValue JSDOMWindowTableValues[296] =
{
{ "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 },
{ "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 },
@@ -540,7 +539,6 @@ static const HashTableValue JSDOMWindowTableValues[297] =
{ "MessageChannel", DontDelete, (intptr_t)jsDOMWindowMessageChannelConstructor, (intptr_t)setJSDOMWindowMessageChannelConstructor },
{ "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor },
{ "SharedWorker", DontDelete, (intptr_t)jsDOMWindowSharedWorkerConstructor, (intptr_t)setJSDOMWindowSharedWorkerConstructor },
- { "WebSocket", DontDelete, (intptr_t)jsDOMWindowWebSocketConstructor, (intptr_t)setJSDOMWindowWebSocketConstructor },
{ "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor },
{ "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor },
{ "MimeType", DontDelete, (intptr_t)jsDOMWindowMimeTypeConstructor, (intptr_t)setJSDOMWindowMimeTypeConstructor },
@@ -588,7 +586,7 @@ static JSC_CONST_HASHTABLE HashTable JSDOMWindowTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 65535, JSDOMWindowTableValues, 0 };
#else
- { 1068, 1023, JSDOMWindowTableValues, 0 };
+ { 1067, 1023, JSDOMWindowTableValues, 0 };
#endif
/* Hash table for prototype */
@@ -3275,14 +3273,6 @@ JSValue jsDOMWindowSharedWorkerConstructor(ExecState* exec, const Identifier&, c
return castedThis->sharedWorker(exec);
}
-JSValue jsDOMWindowWebSocketConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
-{
- JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
- if (!castedThis->allowsAccessFrom(exec))
- return jsUndefined();
- return castedThis->webSocket(exec);
-}
-
JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
@@ -5678,14 +5668,6 @@ void setJSDOMWindowSharedWorkerConstructor(ExecState* exec, JSObject* thisObject
static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "SharedWorker"), value);
}
-void setJSDOMWindowWebSocketConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
-{
- if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
- return;
- // Shadowing a built-in constructor
- static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "WebSocket"), value);
-}
-
void setJSDOMWindowPluginConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index afc8106..5a087e7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -82,7 +82,6 @@ public:
JSC::JSValue messageChannel(JSC::ExecState*) const;
JSC::JSValue worker(JSC::ExecState*) const;
JSC::JSValue sharedWorker(JSC::ExecState*) const;
- JSC::JSValue webSocket(JSC::ExecState*) const;
JSC::JSValue audio(JSC::ExecState*) const;
// Custom functions
@@ -679,8 +678,6 @@ JSC::JSValue jsDOMWindowWorkerConstructor(JSC::ExecState*, const JSC::Identifier
void setJSDOMWindowWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowSharedWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowSharedWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
-JSC::JSValue jsDOMWindowWebSocketConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
-void setJSDOMWindowWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowPluginConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginArrayConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index ee8726a..e67daf9 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -507,7 +507,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
hostWindow()->repaint(panScrollIconDirtyRect, true);
}
- if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
+ if (canBlitOnScroll()) { // The main frame can just blit the WebView window
// FIXME: Find a way to blit subframes without blitting overlapping content
hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
} else {
@@ -597,14 +597,6 @@ void ScrollView::setParent(ScrollView* parentView)
if (m_scrollbarsAvoidingResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
-#if PLATFORM(QT)
- if (m_widgetsPreventingBlitting && parent())
- parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
-
- if (m_widgetsPreventingBlitting && parentView)
- parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
-#endif
-
Widget::setParent(parentView);
if (m_scrollbarsAvoidingResizer && parent())
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 1950a54..5dacff5 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -305,16 +305,6 @@ private:
NSScrollView<WebCoreFrameScrollView>* scrollView() const;
#endif
-#if PLATFORM(QT)
-public:
- void adjustWidgetsPreventingBlittingCount(int delta);
-private:
- bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
- unsigned m_widgetsPreventingBlitting;
-#else
- bool rootPreventsBlitting() const { return false; }
-#endif
-
#if PLATFORM(GTK)
public:
void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj);
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
index f7ebbc7..48bca19 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
@@ -36,7 +36,9 @@ QWebPopup::QWebPopup(PopupMenuClient* client)
{
Q_ASSERT(m_client);
+#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5)
setFont(m_client->menuStyle().font().font());
+#endif
connect(this, SIGNAL(activated(int)),
SLOT(activeChanged(int)), Qt::QueuedConnection);
}
@@ -44,9 +46,16 @@ QWebPopup::QWebPopup(PopupMenuClient* client)
void QWebPopup::exec()
{
+ // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
+ // as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
+ // On the other platforms it's okay to use QCursor::pos().
+#if defined(Q_WS_MAEMO_5)
+ showPopup();
+#else
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(this, &event);
+#endif
}
void QWebPopup::showPopup()
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index 501a28b..6a1eee8 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -125,7 +125,6 @@ PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
RenderThemeQt::RenderThemeQt(Page* page)
: RenderTheme()
, m_page(page)
- , m_fallbackStyle(0)
{
QPushButton button;
button.setAttribute(Qt::WA_MacSmallSize);
@@ -135,6 +134,8 @@ RenderThemeQt::RenderThemeQt(Page* page)
#ifdef Q_WS_MAC
m_buttonFontPixelSize = fontInfo.pixelSize();
#endif
+
+ m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
}
RenderThemeQt::~RenderThemeQt()
@@ -143,19 +144,17 @@ RenderThemeQt::~RenderThemeQt()
}
// for some widget painting, we need to fallback to Windows style
-QStyle* RenderThemeQt::fallbackStyle()
+QStyle* RenderThemeQt::fallbackStyle() const
{
- if (!m_fallbackStyle)
- m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
-
- if (!m_fallbackStyle)
- m_fallbackStyle = QApplication::style();
-
- return m_fallbackStyle;
+ return (m_fallbackStyle) ? m_fallbackStyle : QApplication::style();
}
QStyle* RenderThemeQt::qStyle() const
{
+#ifdef Q_WS_MAEMO_5
+ return fallbackStyle();
+#endif
+
if (m_page) {
ChromeClientQt* client = static_cast<ChromeClientQt*>(m_page->chrome()->client());
@@ -758,6 +757,10 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
if (result == RadioPart || result == CheckboxPart)
option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);
+#ifdef Q_WS_MAEMO_5
+ static QPalette lightGrayPalette(Qt::lightGray);
+ option.palette = lightGrayPalette;
+#else
// If the owner widget has a custom palette, use it
Page* page = o->document()->page();
if (page) {
@@ -766,6 +769,7 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
if (pageClient)
option.palette = pageClient->palette();
}
+#endif
return result;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
index 617c875..19337ac 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
@@ -138,7 +138,7 @@ private:
void setPopupPadding(RenderStyle*) const;
QStyle* qStyle() const;
- QStyle* fallbackStyle();
+ QStyle* fallbackStyle() const;
Page* m_page;
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
index ccbd751..17ad253 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,32 +36,19 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-// Windowed plugins are using native windows and are thus preventing
-// us from doing any kind of scrolling optimization.
-
-void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
-{
- m_widgetsPreventingBlitting += delta;
- if (parent())
- parent()->adjustWidgetsPreventingBlittingCount(delta);
-}
-
void ScrollView::platformAddChild(Widget*)
{
- adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
child->hide();
- adjustWidgetsPreventingBlittingCount(-1);
}
}
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index e61736b..476ab8a 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
@@ -126,6 +126,10 @@ void PluginView::updatePluginWidget()
// scroll, we need to move/resize immediately.
if (!m_windowRect.intersects(frameView->frameRect()))
setNPWindowIfNeeded();
+
+ // Make sure we get repainted afterwards. This is necessary for downward
+ // scrolling to move the plugin widget properly.
+ invalidate();
}
void PluginView::setFocus()
@@ -657,7 +661,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
void PluginView::invalidateRect(const IntRect& rect)
{
if (m_isWindowed) {
- platformWidget()->update(rect);
+ if (platformWidget())
+ platformWidget()->update(rect);
return;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index 1d4b46f..79538ff 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -57,6 +57,106 @@ void QWebViewPrivate::_q_pageDestroyed()
view->setPage(0);
}
+#ifdef Q_WS_MAEMO_5
+#include "qabstractkineticscroller.h"
+
+class QWebViewKineticScroller : public QAbstractKineticScroller {
+public:
+ QWebViewKineticScroller() : QAbstractKineticScroller() {}
+ // remember the frame where the button was pressed
+ bool eventFilter(QObject* o, QEvent* ev)
+ {
+ switch (ev->type()) {
+ case QEvent::MouseButtonPress: {
+ QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
+ if (hitFrame)
+ m_frame = hitFrame;
+ break;
+ }
+ default:
+ break;
+ }
+ return QAbstractKineticScroller::eventFilter(o, ev);
+ }
+
+protected:
+ QWebFrame* currentFrame() const
+ {
+ if (!m_frame.isNull())
+ return m_frame.data();
+
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* frame = view->page()->mainFrame();
+ return frame;
+ }
+
+ // Returns the innermost frame at the given position that can scroll.
+ QWebFrame* scrollingFrameAt(const QPoint& pos) const
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame();
+ QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
+
+ while (hitFrame && range.width() <= 1 && range.height() <= 1)
+ hitFrame = hitFrame->parentFrame();
+
+ return hitFrame;
+ }
+
+ void attachToWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal);
+ m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical);
+ mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ view->installEventFilter(this);
+ }
+
+ void removeFromWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ view->removeEventFilter(this);
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
+ }
+
+ QRect positionRange() const
+ {
+ QRect r;
+ QWebFrame* frame = currentFrame();
+ r.setSize(frame->contentsSize() - frame->geometry().size());
+ return r;
+ }
+
+ QPoint position() const
+ {
+ QWebFrame* frame = currentFrame();
+ return frame->scrollPosition();
+ }
+
+ QSize viewportSize() const
+ {
+ return static_cast<QWebView*>(widget())->page()->viewportSize();
+ }
+
+ void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
+ {
+ QWebFrame* frame = currentFrame();
+ frame->setScrollPosition(point);
+ }
+
+ QPointer<QWebFrame> m_frame;
+ Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
+ Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy;
+};
+
+#endif // Q_WS_MAEMO_5
+
+
/*!
\class QWebView
\since 4.4
@@ -153,6 +253,10 @@ QWebView::QWebView(QWidget *parent)
setAttribute(Qt::WA_InputMethodEnabled);
#endif
+#if defined(Q_WS_MAEMO_5)
+ QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
+ scroller->setWidget(this);
+#endif
setAcceptDrops(true);
setMouseTracking(true);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 09acd47..1026ac5 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,98 @@
+2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Do not set the combobox font on Maemo5 and S60; use the
+ default instead.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::populate):
+
+2010-01-28 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Support kinetic scrolling on Maemo 5
+
+ https://bugs.webkit.org/show_bug.cgi?id=34267
+
+ Patch by Ralf Engels <ralf.engels@nokia.com> and
+ Robert Griebl <rgriebl@trolltech.com>
+
+ * Api/qwebview.cpp:
+ (QWebViewKineticScroller::QWebViewKineticScroller):
+ (QWebViewKineticScroller::eventFilter):
+ (QWebViewKineticScroller::currentFrame):
+ (QWebViewKineticScroller::scrollingFrameAt):
+ (QWebViewKineticScroller::attachToWidget):
+ (QWebViewKineticScroller::removeFromWidget):
+ (QWebViewKineticScroller::positionRange):
+ (QWebViewKineticScroller::position):
+ (QWebViewKineticScroller::viewportSize):
+ (QWebViewKineticScroller::setPosition):
+ (QWebView::QWebView):
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann
+
+ Disable auto-uppercase and predictive text on Maemo5, just like the
+ build-in MicroB Browser.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+
+2010-01-28 Trond Kjernåsen <trond@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix for endless print loop when printing web pages
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Show comboboxes on Maemo 5
+ https://bugs.webkit.org/show_bug.cgi?id=34088
+
+ Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
+ get the combobox position right. The position on Maemo 5 is independent from the mouse
+ and there's no QCursor::pos().
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ In r52152 a patch was landed to convert a null QString
+ to an empty WebCore::String in case the prompt was accepted
+ but the default implementation returned the null QString.
+
+ The patch tried to avoid assign to result twice and
+ was not checking the QString if it is null but the default
+ value. This lead to always returning an empty string on
+ successful prompts. Fix it by checking the variable 'x'
+ for isNull.
+
+ The manual test case used didn't cover the case of non
+ empty input, replace it with an automatic test case that
+ should cover all cases.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug.
+ * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case
+ (JSPromptPage::JSPromptPage):
+ (JSPromptPage::javaScriptPrompt):
+ (tst_QWebPage::testJSPrompt):
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index c5d2792..0c5df4a 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -281,7 +281,7 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const
// Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
// but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
- if (rc && result.isNull())
+ if (rc && x.isNull())
result = String("");
else
result = x;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 34241f0..2d1a1eb 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -615,7 +615,12 @@ void EditorClientQt::setInputMethodState(bool active)
}
}
webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#endif
+#ifdef Q_WS_MAEMO_5
+ // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
+ webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
+ webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
+#endif // Q_WS_MAEMO_5
+#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
emit m_page->microFocusChanged();
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index ee1969d..0e04acc 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ Copyright (C) 2010 Holger Hans Peter Freyther
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -154,6 +155,7 @@ private slots:
void screenshot();
void originatingObjectInNetworkRequests();
+ void testJSPrompt();
private:
QWebView* m_view;
@@ -1781,5 +1783,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
#endif
}
+/**
+ * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914
+ *
+ * From JS we test the following conditions.
+ *
+ * OK + QString() => SUCCESS, empty string (but not null)
+ * OK + "text" => SUCCESS, "text"
+ * CANCEL + QString() => CANCEL, null string
+ * CANCEL + "text" => CANCEL, null string
+ */
+class JSPromptPage : public QWebPage {
+ Q_OBJECT
+public:
+ JSPromptPage()
+ {}
+
+ bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result)
+ {
+ if (msg == QLatin1String("test1")) {
+ *result = QString();
+ return true;
+ } else if (msg == QLatin1String("test2")) {
+ *result = QLatin1String("text");
+ return true;
+ } else if (msg == QLatin1String("test3")) {
+ *result = QString();
+ return false;
+ } else if (msg == QLatin1String("test4")) {
+ *result = QLatin1String("text");
+ return false;
+ }
+
+ qFatal("Unknown msg.");
+ return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
+ }
+};
+
+void tst_QWebPage::testJSPrompt()
+{
+ JSPromptPage page;
+ bool res;
+
+ // OK + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test1');"
+ "retval=='' && retval.length == 0;").toBool();
+ QVERIFY(res);
+
+ // OK + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test2');"
+ "retval=='text' && retval.length == 4;").toBool();
+ QVERIFY(res);
+
+ // Cancel + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test3');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+
+ // Cancel + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test4');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 38e1886..177bee4 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -497,6 +497,9 @@ public:
WA_WState_AcceptedTouchBeginEvent = 122,
WA_TouchPadAcceptSingleTouchEvents = 123,
+ WA_MergeSoftkeys = 124,
+ WA_MergeSoftkeysRecursively = 125,
+
// Add new attributes before this line
WA_AttributeCount
};
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 871dd5c..6627c76 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -524,11 +524,11 @@
receiver are in the same thread. Same as QueuedConnection,
if the emitter and receiver are in different threads.
- \value DirectConnection
+ \value DirectConnection
The slot is invoked immediately, when the signal is
emitted.
- \value QueuedConnection
+ \value QueuedConnection
The slot is invoked when control returns to the event loop
of the receiver's thread. The slot is executed in the
receiver's thread.
@@ -1243,6 +1243,17 @@
\value WA_TouchPadAcceptSingleTouchEvents Allows touchpad single
touch events to be sent to the widget.
+ \value WA_MergeSoftkeys Allows widget to merge softkeys with parent widget,
+ i.e. widget can set only one softkeys and request softkey implementation
+ to take rest of the softkeys from the parent. Note parents are traversed until
+ WA_MergeSoftkeys is not set. See also Qt::WA_MergeSoftkeysRecursively
+ This attribute currently has effect only on Symbian platforms
+
+ \value WA_MergeSoftkeysRecursively Allows widget to merge softkeys recursively
+ with all parents. If this attribute is set, the widget parents are traversed until
+ window boundary (widget without parent or dialog) is found.
+ This attribute currently has effect only on Symbian platforms
+
\omitvalue WA_SetLayoutDirection
\omitvalue WA_InputMethodTransparent
\omitvalue WA_WState_CompressKeys
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 1c68716..bc68599 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -83,7 +83,7 @@ public:
if(stream->message_output) {
QT_TRY {
qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
- } QT_CATCH(std::bad_alloc) { /* We're out of memory - give up. */ }
+ } QT_CATCH(std::bad_alloc&) { /* We're out of memory - give up. */ }
}
delete stream;
}
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 722d6d3..9179485 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -98,7 +98,7 @@ static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QS
if (!fileName.isEmpty()
&& QT_STAT(QFile::encodeName(fileName), &statBuf) == 0
&& (statBuf.st_mode & S_IFMT) == S_IFREG) {
- mode += "+";
+ mode += '+';
} else {
mode = "wb+";
}
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index ddced73..75cde51 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -919,34 +919,41 @@ bool QProcessPrivate::waitForFinished(int msecs)
Q_Q(QProcess);
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(%d)", msecs);
- TRequestStatus timerStatus = 0;
- TRequestStatus logonStatus = 0;
+ TRequestStatus timerStatus = KErrNone;
+ TRequestStatus logonStatus = KErrNone;
bool timeoutOccurred = false;
// Logon to process to observe its death
if (qt_rprocess_running(symbianProcess)) {
symbianProcess->Logon(logonStatus);
- // Create timer
- RTimer timer;
- timer.CreateLocal();
- TTimeIntervalMicroSeconds32 interval(msecs*1000);
- timer.After(timerStatus, interval);
+ if (msecs < 0) {
+ // If timeout is negative, there is no timeout
+ QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (just logon)...");
+ User::WaitForRequest(logonStatus);
+ QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
+ } else {
+ // Create timer
+ RTimer timer;
+ timer.CreateLocal();
+ TTimeIntervalMicroSeconds32 interval(msecs*1000);
+ timer.After(timerStatus, interval);
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting...");
- User::WaitForRequest(logonStatus, timerStatus);
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
+ QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (logon + timer)...");
+ User::WaitForRequest(logonStatus, timerStatus);
+ QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
- if (timerStatus == KErrNone)
- timeoutOccurred = true;
+ if (timerStatus == KErrNone)
+ timeoutOccurred = true;
- timer.Cancel();
- timer.Close();
+ timer.Cancel();
+ timer.Close();
- symbianProcess->LogonCancel(logonStatus);
+ symbianProcess->LogonCancel(logonStatus);
- // Eat cancel request completion so that it won't mess up main thread scheduling later
- User::WaitForRequest(logonStatus, timerStatus);
+ // Eat cancel request completion so that it won't mess up main thread scheduling later
+ User::WaitForRequest(logonStatus, timerStatus);
+ }
} else {
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(), qt_rprocess_running returned false");
}
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 005dedc..e3137f0 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2267,6 +2267,10 @@ QStringList QCoreApplication::libraryPaths()
\a paths. All existing paths will be deleted and the path list
will consist of the paths given in \a paths.
+ In Symbian this function is only useful for setting paths for
+ finding Qt extension plugin stubs, since the OS can only
+ load libraries from the \c{/sys/bin} directory.
+
\sa libraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary
*/
void QCoreApplication::setLibraryPaths(const QStringList &paths)
@@ -2290,6 +2294,10 @@ void QCoreApplication::setLibraryPaths(const QStringList &paths)
is \c INSTALL/plugins, where \c INSTALL is the directory where Qt was
installed.
+ In Symbian this function is only useful for adding paths for
+ finding Qt extension plugin stubs, since the OS can only
+ load libraries from the \c{/sys/bin} directory.
+
\sa removeLibraryPath(), libraryPaths(), setLibraryPaths()
*/
void QCoreApplication::addLibraryPath(const QString &path)
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 7112043..f2c2384 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -539,6 +539,7 @@ bool QLibraryPrivate::loadPlugin()
\row \i AIX \i \c .a
\row \i HP-UX \i \c .sl, \c .so (HP-UXi)
\row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
+ \row \i Symbian \i \c .dll
\endtable
Trailing versioning numbers on Unix are ignored.
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index b276f0a..37d5b87 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -40,7 +40,9 @@
****************************************************************************/
//#define WINVER 0x0500
+#if _WIN32_WINNT < 0x0400
#define _WIN32_WINNT 0x0400
+#endif
#include "qthread.h"
diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h
index 390a4a0..ecd50c1 100644
--- a/src/gui/dialogs/qprintdialog.h
+++ b/src/gui/dialogs/qprintdialog.h
@@ -97,9 +97,9 @@ public:
void done(int result);
#if defined (Q_OS_UNIX) && defined (QT3_SUPPORT)
- void setPrinter(QPrinter *, bool = false);
- QPrinter *printer() const;
- void addButton(QPushButton *button);
+ QT3_SUPPORT void setPrinter(QPrinter *, bool = false);
+ QT3_SUPPORT QPrinter *printer() const;
+ QT3_SUPPORT void addButton(QPushButton *button);
#endif
void setOption(PrintDialogOption option, bool on = true);
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 360ed14..fcc61e5 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -65,6 +65,7 @@
#ifndef SHGFI_ADDOVERLAYS
# define SHGFI_ADDOVERLAYS 0x000000020
+# define SHGFI_OVERLAYINDEX 0x000000040
#endif
QT_BEGIN_NAMESPACE
@@ -248,7 +249,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the small icon
#ifndef Q_OS_WINCE
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
- sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
+ sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX);
#else
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX);
@@ -287,7 +288,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the big icon
#ifndef Q_OS_WINCE
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
- sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
+ sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX);
#else
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX);
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index f2bd288..0993b86 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -7,7 +7,7 @@ PRECOMPILED_HEADER = kernel/qt_gui_pch.h
KERNEL_P= kernel
HEADERS += \
kernel/qaction.h \
- kernel/qaction_p.h \
+ kernel/qaction_p.h \
kernel/qactiongroup.h \
kernel/qapplication.h \
kernel/qapplication_p.h \
@@ -37,8 +37,8 @@ HEADERS += \
kernel/qstackedlayout.h \
kernel/qtooltip.h \
kernel/qwhatsthis.h \
- kernel/qwidget.h \
- kernel/qwidget_p.h \
+ kernel/qwidget.h \
+ kernel/qwidget_p.h \
kernel/qwidgetaction.h \
kernel/qwidgetaction_p.h \
kernel/qwindowdefs.h \
@@ -49,6 +49,7 @@ HEADERS += \
kernel/qgesturerecognizer.h \
kernel/qgesturemanager_p.h \
kernel/qsoftkeymanager_p.h \
+ kernel/qsoftkeymanager_common_p.h \
kernel/qguiplatformplugin_p.h
SOURCES += \
@@ -84,14 +85,14 @@ SOURCES += \
kernel/qgesturerecognizer.cpp \
kernel/qgesturemanager.cpp \
kernel/qsoftkeymanager.cpp \
- kernel/qdesktopwidget.cpp \
+ kernel/qdesktopwidget.cpp \
kernel/qguiplatformplugin.cpp
win32 {
DEFINES += QT_NO_DIRECTDRAW
- HEADERS += \
- kernel/qwinnativepangesturerecognizer_win_p.h
+ HEADERS += \
+ kernel/qwinnativepangesturerecognizer_win_p.h
SOURCES += \
kernel/qapplication_win.cpp \
@@ -103,30 +104,34 @@ win32 {
kernel/qsound_win.cpp \
kernel/qwidget_win.cpp \
kernel/qole_win.cpp \
- kernel/qkeymapper_win.cpp \
- kernel/qwinnativepangesturerecognizer_win.cpp
+ kernel/qkeymapper_win.cpp \
+ kernel/qwinnativepangesturerecognizer_win.cpp
- !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
+ !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
}
symbian {
- SOURCES += \
- kernel/qapplication_s60.cpp \
- kernel/qeventdispatcher_s60.cpp \
- kernel/qwidget_s60.cpp \
- kernel/qcursor_s60.cpp \
- kernel/qdesktopwidget_s60.cpp \
- kernel/qkeymapper_s60.cpp\
- kernel/qclipboard_s60.cpp\
- kernel/qdnd_s60.cpp \
- kernel/qsound_s60.cpp
+ SOURCES += \
+ kernel/qapplication_s60.cpp \
+ kernel/qeventdispatcher_s60.cpp \
+ kernel/qwidget_s60.cpp \
+ kernel/qcursor_s60.cpp \
+ kernel/qdesktopwidget_s60.cpp \
+ kernel/qkeymapper_s60.cpp\
+ kernel/qclipboard_s60.cpp\
+ kernel/qdnd_s60.cpp \
+ kernel/qsound_s60.cpp \
+ kernel/qsoftkeymanager_s60.cpp
- HEADERS += \
- kernel/qt_s60_p.h \
- kernel/qeventdispatcher_s60_p.h
- LIBS += -lbafl -lestor
+ HEADERS += \
+ kernel/qt_s60_p.h \
+ kernel/qeventdispatcher_s60_p.h \
+ kernel/qsoftkeymanager_s60_p.h
+
+ LIBS += -lbafl -lestor
- INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += ../3rdparty/s60
}
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index f61d2fe..d255604 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -644,6 +644,8 @@ extern "C" {
- (void)mouseEntered:(NSEvent *)event
{
+ if (qwidgetprivate->data.in_destructor)
+ return;
QEvent enterEvent(QEvent::Enter);
NSPoint windowPoint = [event locationInWindow];
NSPoint globalPoint = [[event window] convertBaseToScreen:windowPoint];
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 354f90b..6d108b0 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -41,34 +41,18 @@
#include "qapplication.h"
#include "qevent.h"
-#ifdef Q_WS_S60
-#include "qstyle.h"
-#include "private/qt_s60_p.h"
-#endif
+#include "qbitmap.h"
#include "private/qsoftkeymanager_p.h"
#include "private/qobject_p.h"
-
-#ifndef QT_NO_SOFTKEYMANAGER
-QT_BEGIN_NAMESPACE
+#include "private/qsoftkeymanager_common_p.h"
#ifdef Q_WS_S60
-static const int s60CommandStart = 6000;
+#include "private/qsoftkeymanager_s60_p.h"
#endif
-class QSoftKeyManagerPrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QSoftKeyManager)
-
-public:
- static void updateSoftKeys_sys(const QList<QAction*> &softKeys);
-
-private:
- QHash<QAction*, Qt::Key> keyedActions;
- static QSoftKeyManager *self;
- static QWidget *softKeySource;
-};
+#ifndef QT_NO_SOFTKEYMANAGER
+QT_BEGIN_NAMESPACE
-QWidget *QSoftKeyManagerPrivate::softKeySource = 0;
QSoftKeyManager *QSoftKeyManagerPrivate::self = 0;
const char *QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
@@ -105,7 +89,12 @@ QSoftKeyManager *QSoftKeyManager::instance()
return QSoftKeyManagerPrivate::self;
}
-QSoftKeyManager::QSoftKeyManager() : QObject(*(new QSoftKeyManagerPrivate), 0)
+QSoftKeyManager::QSoftKeyManager() :
+#ifdef Q_WS_S60
+ QObject(*(new QSoftKeyManagerPrivateS60), 0)
+#else
+ QObject(*(new QSoftKeyManagerPrivate), 0)
+#endif
{
}
@@ -115,10 +104,11 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
QAction *action = new QAction(QSoftKeyManager::tr(text), actionWidget);
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
+ case MenuSoftKey: // FALL-THROUGH
+ action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar
case OkSoftKey:
case SelectSoftKey:
case DoneSoftKey:
- case MenuSoftKey:
softKeyRole = QAction::PositiveSoftKey;
break;
case CancelSoftKey:
@@ -147,7 +137,7 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key
#endif //QT_NO_ACTION
}
-void QSoftKeyManager::cleanupHash(QObject* obj)
+void QSoftKeyManager::cleanupHash(QObject *obj)
{
Q_D(QSoftKeyManager);
QAction *action = qobject_cast<QAction*>(obj);
@@ -175,137 +165,78 @@ void QSoftKeyManager::updateSoftKeys()
QApplication::postEvent(QSoftKeyManager::instance(), event);
}
-bool QSoftKeyManager::event(QEvent *e)
+bool QSoftKeyManager::appendSoftkeys(const QWidget &source, int level)
{
-#ifndef QT_NO_ACTION
- if (e->type() == QEvent::UpdateSoftKeys) {
- QList<QAction*> softKeys;
- QWidget *source = QApplication::focusWidget();
- do {
- if (source) {
- QList<QAction*> actions = source->actions();
- for (int i = 0; i < actions.count(); ++i) {
- if (actions.at(i)->softKeyRole() != QAction::NoSoftKey)
- softKeys.append(actions.at(i));
- }
-
- QWidget *parent = source->parentWidget();
- if (parent && softKeys.isEmpty() && !source->isWindow())
- source = parent;
- else
- break;
- } else {
- source = QApplication::activeWindow();
- }
- } while (source);
-
- QSoftKeyManagerPrivate::softKeySource = source;
- QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
- return true;
+ Q_D(QSoftKeyManager);
+ bool ret = false;
+ QList<QAction*> actions = source.actions();
+ for (int i = 0; i < actions.count(); ++i) {
+ if (actions.at(i)->softKeyRole() != QAction::NoSoftKey) {
+ d->requestedSoftKeyActions.insert(level, actions.at(i));
+ ret = true;
+ }
}
-#endif //QT_NO_ACTION
- return false;
+ return ret;
}
-#ifdef Q_WS_S60
-void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys)
+QWidget *QSoftKeyManager::softkeySource(QWidget *previousSource, bool& recursiveMerging)
{
- // lets not update softkeys if s60 native dialog or menu is shown
- if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)
- || CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog())
- return;
-
- CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer();
- nativeContainer->DrawableWindow()->SetOrdinalPosition(0);
- nativeContainer->DrawableWindow()->SetPointerCapturePriority(1); //keep softkeys available in modal dialog
- nativeContainer->DrawableWindow()->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren);
-
- int position = -1;
- bool needsExitButton = true;
- QT_TRAP_THROWING(
- //Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
- nativeContainer->SetCommandL(0, -1, KNullDesC);
- nativeContainer->SetCommandL(2, -1, KNullDesC);
- );
-
- for (int index = 0; index < softkeys.count(); index++) {
- const QAction* softKeyAction = softkeys.at(index);
- switch (softKeyAction->softKeyRole()) {
- // Positive Actions on the LSK
- case QAction::PositiveSoftKey:
- position = 0;
- break;
- case QAction::SelectSoftKey:
- position = 0;
- break;
- // Negative Actions on the RSK
- case QAction::NegativeSoftKey:
- needsExitButton = false;
- position = 2;
- break;
- default:
- break;
- }
-
- int command = (softKeyAction->objectName().contains(QLatin1String("_q_menuSoftKeyAction")))
- ? EAknSoftkeyOptions
- : s60CommandStart + index;
-
- // _q_menuSoftKeyAction action is set to "invisible" and all invisible actions are by default
- // disabled. However we never want to dim options softkey, even it is set to "invisible"
- bool dimmed = (command == EAknSoftkeyOptions) ? false : !softKeyAction->isEnabled();
-
- if (position != -1) {
- const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut);
- QString iconText = softKeyAction->iconText();
- TPtrC text = qt_QString2TPtrC( underlineShortCut ? softKeyAction->text() : iconText);
- QT_TRAP_THROWING(
- nativeContainer->SetCommandL(position, command, text);
- nativeContainer->DimCommand(command, dimmed);
- );
- }
+ Q_D(QSoftKeyManager);
+ QWidget *source = NULL;
+ if (!previousSource) {
+ // Initial source is primarily focuswidget and secondarily activeWindow
+ source = QApplication::focusWidget();
+ if (!source)
+ source = QApplication::activeWindow();
+ } else {
+ // Softkey merging is based on four criterias
+ // 1. Implicit merging is used whenever focus widget does not specify any softkeys
+ bool implicitMerging = d->requestedSoftKeyActions.isEmpty();
+ // 2. Explicit merging with parent is used whenever WA_MergeSoftkeys widget attribute is set
+ bool explicitMerging = previousSource->testAttribute(Qt::WA_MergeSoftkeys);
+ // 3. Explicit merging with all parents
+ recursiveMerging |= previousSource->testAttribute(Qt::WA_MergeSoftkeysRecursively);
+ // 4. Implicit and explicit merging always stops at window boundary
+ bool merging = (implicitMerging || explicitMerging || recursiveMerging) && !previousSource->isWindow();
+
+ source = merging ? previousSource->parentWidget() : NULL;
}
-
- const Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource
- ? QSoftKeyManagerPrivate::softKeySource->window()->windowType()
- : Qt::Widget;
-
- if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup)
- QT_TRAP_THROWING(
- nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit"))));
-
- nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation
+ return source;
}
-bool QSoftKeyManager::handleCommand(int command)
+bool QSoftKeyManager::handleUpdateSoftKeys()
{
- if (command >= s60CommandStart && QSoftKeyManagerPrivate::softKeySource) {
- int index = command - s60CommandStart;
- const QList<QAction*>& softKeys = QSoftKeyManagerPrivate::softKeySource->actions();
- for (int i = 0, j = 0; i < softKeys.count(); ++i) {
- QAction *action = softKeys.at(i);
- if (action->softKeyRole() != QAction::NoSoftKey) {
- if (j == index) {
- QWidget *parent = action->parentWidget();
- if (parent && parent->isEnabled()) {
- action->activate(QAction::Trigger);
- return true;
- }
- }
- j++;
- }
+ Q_D(QSoftKeyManager);
+ int level = 0;
+ d->requestedSoftKeyActions.clear();
+ bool recursiveMerging = false;
+ QWidget *source = softkeySource(NULL, recursiveMerging);
+ do {
+ if (source) {
+ bool added = appendSoftkeys(*source, level);
+ source = softkeySource(source, recursiveMerging);
+ level = added ? ++level : level;
}
- }
+ } while (source);
- return false;
+ d->updateSoftKeys_sys();
+ return true;
}
-#else
-
-void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &)
+bool QSoftKeyManager::event(QEvent *e)
{
+#ifndef QT_NO_ACTION
+ if (e->type() == QEvent::UpdateSoftKeys)
+ return handleUpdateSoftKeys();
+#endif //QT_NO_ACTION
+ return false;
}
+#ifdef Q_WS_S60
+bool QSoftKeyManager::handleCommand(int command)
+{
+ return static_cast<QSoftKeyManagerPrivateS60*>(QSoftKeyManager::instance()->d_func())->handleCommand(command);
+}
#endif
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h
new file mode 100644
index 0000000..460d0dc
--- /dev/null
+++ b/src/gui/kernel/qsoftkeymanager_common_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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 QSOFTKEYMANAGER_COMMON_P_H
+#define QSOFTKEYMANAGER_COMMON_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_HEADER
+
+#ifndef QT_NO_SOFTKEYMANAGER
+
+QT_BEGIN_NAMESPACE
+
+class QSoftKeyManagerPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QSoftKeyManager)
+
+public:
+ virtual void updateSoftKeys_sys() {};
+
+protected:
+ static QSoftKeyManager *self;
+ QHash<QAction*, Qt::Key> keyedActions;
+ QMultiHash<int, QAction*> requestedSoftKeyActions;
+
+};
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_SOFTKEYMANAGER
+
+QT_END_HEADER
+
+#endif // QSOFTKEYMANAGER_COMMON_P_H \ No newline at end of file
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index c901a29..ce902fe 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE
class QSoftKeyManagerPrivate;
+const char MENU_ACTION_PROPERTY[] = "_q_menuaction";
+
class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
{
Q_OBJECT
@@ -79,26 +81,30 @@ public:
};
static void updateSoftKeys();
- static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
- static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
-
#ifdef Q_WS_S60
static bool handleCommand(int);
#endif
-private:
- QSoftKeyManager();
- static QSoftKeyManager *instance();
- static const char *standardSoftKeyText(StandardSoftKey standardKey);
+ static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
+ static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
protected:
bool event(QEvent *e);
- Q_DISABLE_COPY(QSoftKeyManager)
+private:
+ QSoftKeyManager();
+ static QSoftKeyManager *instance();
+ static const char *standardSoftKeyText(StandardSoftKey standardKey);
+ bool appendSoftkeys(const QWidget &source, int level);
+ QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging);
+ bool handleUpdateSoftKeys();
private Q_SLOTS:
void cleanupHash(QObject* obj);
void sendKeyEvent();
+
+private:
+ Q_DISABLE_COPY(QSoftKeyManager)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
new file mode 100644
index 0000000..67ed8b0
--- /dev/null
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -0,0 +1,366 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include "qapplication.h"
+#include "qevent.h"
+#include "qbitmap.h"
+#include "qstyle.h"
+#include "qmenubar.h"
+#include "private/qt_s60_p.h"
+#include "private/qmenu_p.h"
+#include "private/qsoftkeymanager_p.h"
+#include "private/qsoftkeymanager_s60_p.h"
+#include "private/qobject_p.h"
+//#include <eiksoftkeyimage.h>
+#include <eikcmbut.h>
+
+#ifndef QT_NO_SOFTKEYMANAGER
+QT_BEGIN_NAMESPACE
+
+const int S60_COMMAND_START = 6000;
+const int LSK_POSITION = 0;
+const int MSK_POSITION = 3;
+const int RSK_POSITION = 2;
+
+QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60()
+{
+ cachedCbaIconSize[0] = QSize(0,0);
+ cachedCbaIconSize[1] = QSize(0,0);
+ skipNextUpdate = false;
+}
+
+bool QSoftKeyManagerPrivateS60::skipCbaUpdate()
+{
+ // lets not update softkeys if
+ // 1. We don't have application panes, i.e. cba
+ // 2. S60 native dialog or menu is shown
+ if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) ||
+ CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || skipNextUpdate) {
+ skipNextUpdate = false;
+ return true;
+ }
+ return false;
+}
+
+void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonGroupContainer &cba)
+{
+ RDrawableWindow *cbaWindow = cba.DrawableWindow();
+ Q_ASSERT_X(cbaWindow, Q_FUNC_INFO, "Native CBA does not have window!");
+ // Make sure CBA is visible, i.e. CBA window is on top
+ cbaWindow->SetOrdinalPosition(0);
+ // Qt shares same CBA instance between top-level widgets,
+ // make sure we are not faded by underlying window.
+ cbaWindow->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren);
+ // Modal dialogs capture pointer events, but shared cba instance
+ // shall stay responsive. Raise pointer capture priority to keep
+ // softkeys responsive in modal dialogs
+ cbaWindow->SetPointerCapturePriority(1);
+}
+
+void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba)
+{
+ QT_TRAP_THROWING(
+ //Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
+ cba.SetCommandL(0, -1, KNullDesC);
+ // TODO: Should we clear also middle SK?
+ cba.SetCommandL(2, -1, KNullDesC);
+ );
+ realSoftKeyActions.clear();
+}
+
+QString QSoftKeyManagerPrivateS60::softkeyText(QAction &softkeyAction)
+{
+ // In S60 softkeys and menu items do not support key accelerators (i.e.
+ // CTRL+X). Therefore, removing the accelerator characters from both softkey
+ // and menu item texts.
+ const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut);
+ QString iconText = softkeyAction.iconText();
+ return underlineShortCut ? softkeyAction.text() : iconText;
+}
+
+QAction *QSoftKeyManagerPrivateS60::highestPrioritySoftkey(QAction::SoftKeyRole role)
+{
+ QAction *ret = NULL;
+ // Priority look up is two level
+ // 1. First widget with softkeys always has highest priority
+ for (int level = 0; !ret; level++) {
+ // 2. Highest priority action within widget
+ QList<QAction*> actions = requestedSoftKeyActions.values(level);
+ if (actions.isEmpty())
+ break;
+ qSort(actions.begin(), actions.end(), QSoftKeyManagerPrivateS60::actionPriorityMoreThan);
+ foreach (QAction *action, actions) {
+ if (action->softKeyRole() == role) {
+ ret = action;
+ break;
+ }
+ }
+ }
+ return ret;
+}
+
+bool QSoftKeyManagerPrivateS60::actionPriorityMoreThan(const QAction *firstItem, const QAction *secondItem)
+{
+ return firstItem->priority() > secondItem->priority();
+}
+
+void QSoftKeyManagerPrivateS60::setNativeSoftkey(CEikButtonGroupContainer &cba,
+ TInt position, TInt command, const TDesC &text)
+{
+ // Calling SetCommandL causes CBA redraw
+ QT_TRAP_THROWING(cba.SetCommandL(position, command, text));
+}
+
+bool QSoftKeyManagerPrivateS60::isOrientationLandscape()
+{
+ // Hard to believe that there is no public API in S60 to
+ // get current orientation. This workaround works with currently supported resolutions
+ return S60->screenHeightInPixels < S60->screenWidthInPixels;
+}
+
+QSize QSoftKeyManagerPrivateS60::cbaIconSize(CEikButtonGroupContainer *cba, int position)
+{
+ Q_UNUSED(cba);
+ Q_UNUSED(position);
+
+ // Will be implemented when EikSoftkeyImage usage license wise is OK
+/*
+ const int index = isOrientationLandscape() ? 0 : 1;
+ if(cachedCbaIconSize[index].isNull()) {
+ // Only way I figured out to get CBA icon size without RnD SDK, was
+ // Only way I figured out to get CBA icon size without RnD SDK, was
+ // to set some dummy icon to CBA first and then ask CBA button CCoeControl::Size()
+ // The returned value is cached to avoid unnecessary icon setting every time.
+ const bool left = (position == LSK_POSITION);
+ if(position == LSK_POSITION || position == RSK_POSITION) {
+ CEikImage* tmpImage = NULL;
+ QT_TRAP_THROWING(tmpImage = new (ELeave) CEikImage);
+ EikSoftkeyImage::SetImage(cba, *tmpImage, left); // Takes myimage ownership
+ int command = S60_COMMAND_START + position;
+ setNativeSoftkey(*cba, position, command, KNullDesC());
+ cachedCbaIconSize[index] = qt_TSize2QSize(cba->ControlOrNull(command)->Size());
+ EikSoftkeyImage::SetLabel(cba, left);
+ }
+ }
+
+ return cachedCbaIconSize[index];
+*/
+ return QSize();
+}
+
+bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba,
+ QAction &action, int position)
+{
+ bool ret = false;
+ Q_UNUSED(cba);
+ Q_UNUSED(action);
+ Q_UNUSED(position);
+
+ // Will be implemented when EikSoftkeyImage usage license wise is OK
+ /*
+ const bool left = (position == LSK_POSITION);
+ if(position == LSK_POSITION || position == RSK_POSITION) {
+ QIcon icon = action.icon();
+ if (!icon.isNull()) {
+ QPixmap pm = icon.pixmap(cbaIconSize(cba, position));
+ pm = pm.scaled(cbaIconSize(cba, position));
+ QBitmap mask = pm.mask();
+ if (mask.isNull()) {
+ mask = QBitmap(pm.size());
+ mask.fill(Qt::color1);
+ }
+
+ CFbsBitmap* nBitmap = pm.toSymbianCFbsBitmap();
+ CFbsBitmap* nMask = mask.toSymbianCFbsBitmap();
+
+ CEikImage* myimage = new (ELeave) CEikImage;
+ myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered
+
+ EikSoftkeyImage::SetImage(cba, *myimage, left); // Takes myimage ownership
+ ret = true;
+ } else {
+ // Restore softkey to text based
+ EikSoftkeyImage::SetLabel(cba, left);
+ }
+ }
+ */
+ return ret;
+}
+
+bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba,
+ QAction::SoftKeyRole role, int position)
+{
+ QAction *action = highestPrioritySoftkey(role);
+ if (action) {
+ setSoftkeyImage(&cba, *action, position);
+ QString text = softkeyText(*action);
+ TPtrC nativeText = qt_QString2TPtrC(text);
+ int command = S60_COMMAND_START + position;
+ setNativeSoftkey(cba, position, command, nativeText);
+ cba.DimCommand(command, !action->isEnabled());
+ realSoftKeyActions.insert(command, action);
+ return true;
+ }
+ return false;
+}
+
+bool QSoftKeyManagerPrivateS60::setLeftSoftkey(CEikButtonGroupContainer &cba)
+{
+ return setSoftkey(cba, QAction::PositiveSoftKey, LSK_POSITION);
+}
+
+bool QSoftKeyManagerPrivateS60::setMiddleSoftkey(CEikButtonGroupContainer &cba)
+{
+ // Note: In order to get MSK working, application has to have EAknEnableMSK flag set
+ // Currently it is not possible very easily)
+ // For more information see: http://wiki.forum.nokia.com/index.php/Middle_softkey_usage
+ return setSoftkey(cba, QAction::SelectSoftKey, MSK_POSITION);
+}
+
+bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba)
+{
+ if (!setSoftkey(cba, QAction::NegativeSoftKey, RSK_POSITION)) {
+ Qt::WindowType windowType = Qt::Window;
+ QAction *action = requestedSoftKeyActions.value(0);
+ if (action) {
+ QWidget *actionParent = action->parentWidget();
+ Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!");
+
+ QWidget *actionWindow = actionParent->window();
+ Q_ASSERT_X(actionWindow, Q_FUNC_INFO, "Softkey action does not have window!");
+ windowType = actionWindow->windowType();
+ }
+
+ if (windowType != Qt::Dialog && windowType != Qt::Popup) {
+ QString text(QSoftKeyManager::tr("Exit"));
+ TPtrC nativeText = qt_QString2TPtrC(text);
+ setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText);
+ return true;
+ }
+ }
+ return false;
+}
+
+void QSoftKeyManagerPrivateS60::setSoftkeys(CEikButtonGroupContainer &cba)
+{
+ int requestedSoftkeyCount = requestedSoftKeyActions.count();
+ const int maxSoftkeyCount = 2; // TODO: differs based on orientation ans S60 versions (some have MSK)
+ if (requestedSoftkeyCount > maxSoftkeyCount) {
+ // We have more softkeys than available slots
+ // Put highest priority negative action to RSK and Options menu with rest of softkey actions to LSK
+ // TODO: Build menu
+ setLeftSoftkey(cba);
+ if(AknLayoutUtils::MSKEnabled())
+ setMiddleSoftkey(cba);
+ setRightSoftkey(cba);
+ } else {
+ // We have less softkeys than available slots
+ // Put softkeys to request slots based on role
+ setLeftSoftkey(cba);
+ if(AknLayoutUtils::MSKEnabled())
+ setMiddleSoftkey(cba);
+ setRightSoftkey(cba);
+ }
+}
+
+void QSoftKeyManagerPrivateS60::updateSoftKeys_sys()
+{
+ //bool status = CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog();
+ if (skipCbaUpdate())
+ return;
+
+ CEikButtonGroupContainer *nativeContainer = S60->buttonGroupContainer();
+ Q_ASSERT_X(nativeContainer, Q_FUNC_INFO, "Native CBA does not exist!");
+ ensureCbaVisibilityAndResponsiviness(*nativeContainer);
+ clearSoftkeys(*nativeContainer);
+ setSoftkeys(*nativeContainer);
+
+ nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation
+}
+
+bool QSoftKeyManagerPrivateS60::handleCommand(int command)
+{
+ QAction *action = realSoftKeyActions.value(command);
+ if (action) {
+ QVariant property = action->property(MENU_ACTION_PROPERTY);
+ if (property.isValid() && property.toBool()) {
+ QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL());
+ } else if (action->menu()) {
+ // TODO: This is hack, in order to use exising QMenuBar implementation for Symbian
+ // menubar needs to have widget to which it is associated. Since we want to associate
+ // menubar to action (which is inherited from QObejct), we create and associate QWidget
+ // to action and pass that for QMenuBar. This associates the menubar to action, and we
+ // can have own menubar for each action.
+ QWidget *actionContainer = action->property("_q_action_widget").value<QWidget*>();
+ if(!actionContainer) {
+ actionContainer = new QWidget(action->parentWidget());
+ QMenuBar *menuBar = new QMenuBar(actionContainer);
+ foreach(QAction *menuAction, action->menu()->actions()) {
+ QMenu *menu = menuAction->menu();
+ if(menu)
+ menuBar->addMenu(action->menu());
+ else
+ menuBar->addAction(menuAction);
+ }
+ QVariant v;
+ v.setValue(actionContainer);
+ action->setProperty("_q_action_widget", v);
+ }
+ qt_symbian_next_menu_from_action(actionContainer);
+ QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL());
+ // TODO: hack remove, it can happen that IsDisplayingMenuOrDialog return false
+ // in updateSoftKeys_sys, and we will override menu CBA with our own
+ skipNextUpdate = true;
+ } else {
+ Q_ASSERT(action->softKeyRole() != QAction::NoSoftKey);
+ QWidget *actionParent = action->parentWidget();
+ Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!");
+ if (actionParent->isEnabled()) {
+ action->activate(QAction::Trigger);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+QT_END_NAMESPACE
+#endif //QT_NO_SOFTKEYMANAGER
diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h
new file mode 100644
index 0000000..46e3596
--- /dev/null
+++ b/src/gui/kernel/qsoftkeymanager_s60_p.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 QSOFTKEYMANAGER_S60_P_H
+#define QSOFTKEYMANAGER_S60_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qobject_p.h"
+#include "private/qsoftkeymanager_common_p.h"
+
+QT_BEGIN_HEADER
+
+#ifndef QT_NO_SOFTKEYMANAGER
+
+QT_BEGIN_NAMESPACE
+
+class CEikButtonGroupContainer;
+class QAction;
+
+class QSoftKeyManagerPrivateS60 : public QSoftKeyManagerPrivate
+{
+ Q_DECLARE_PUBLIC(QSoftKeyManager)
+
+public:
+ QSoftKeyManagerPrivateS60();
+
+public:
+ void updateSoftKeys_sys();
+ bool handleCommand(int command);
+
+private:
+ bool skipCbaUpdate();
+ void ensureCbaVisibilityAndResponsiviness(CEikButtonGroupContainer &cba);
+ void clearSoftkeys(CEikButtonGroupContainer &cba);
+ QString softkeyText(QAction &softkeyAction);
+ QAction *highestPrioritySoftkey(QAction::SoftKeyRole role);
+ static bool actionPriorityMoreThan(const QAction* item1, const QAction* item2);
+ void setNativeSoftkey(CEikButtonGroupContainer &cba, TInt position, TInt command, const TDesC& text);
+ bool isOrientationLandscape();
+ QSize cbaIconSize(CEikButtonGroupContainer *cba, int position);
+ bool setSoftkeyImage(CEikButtonGroupContainer *cba, QAction &action, int position);
+ bool setSoftkey(CEikButtonGroupContainer &cba, QAction::SoftKeyRole role, int position);
+ bool setLeftSoftkey(CEikButtonGroupContainer &cba);
+ bool setMiddleSoftkey(CEikButtonGroupContainer &cba);
+ bool setRightSoftkey(CEikButtonGroupContainer &cba);
+ void setSoftkeys(CEikButtonGroupContainer &cba);
+
+private:
+ QHash<int, QAction*> realSoftKeyActions;
+ QSize cachedCbaIconSize[2];
+ bool skipNextUpdate;
+};
+
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_SOFTKEYMANAGER
+
+QT_END_HEADER
+
+#endif // QSOFTKEYMANAGER_S60_P_H
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 1163055..735ca7a 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -128,6 +128,7 @@ public:
static inline RWindowGroup& windowGroup();
static inline CWsScreenDevice* screenDevice();
static inline CCoeAppUi* appUi();
+ static inline CEikMenuBar* menuBar();
#ifdef Q_WS_S60
static inline CEikStatusPane* statusPane();
static inline CCoeControl* statusPaneSubPane(TInt aPaneId);
@@ -270,6 +271,11 @@ inline CCoeAppUi* QS60Data::appUi()
return CCoeEnv::Static()-> AppUi();
}
+inline CEikMenuBar* QS60Data::menuBar()
+{
+ return CEikonEnv::Static()->AppUiFactory()->MenuBar();
+}
+
#ifdef Q_WS_S60
inline CEikStatusPane* QS60Data::statusPane()
{
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index ebfab21..78c1562 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3510,6 +3510,8 @@ void QWidgetPrivate::hide_sys()
if (!QWidget::mouseGrabber()){
QWidget *enterWidget = QApplication::widgetAt(QCursor::pos());
+ if (enterWidget && enterWidget->data->in_destructor)
+ enterWidget = 0;
QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover);
qt_mouseover = enterWidget;
}
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 3f2322e..bc56ed0 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3081,6 +3081,8 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti)
QVarLengthArray<glyph_t> glyphs;
QTransform matrix = s->matrix;
matrix.translate(p.x(), p.y());
+ if (matrix.type() == QTransform::TxScale)
+ fe->setFontScale(matrix.m11());
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
const QFixed aliasDelta = QFixed::fromReal(aliasedCoordinateDelta);
@@ -3097,6 +3099,9 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti)
alphaPenBlt(glyphBitmapBytes, glyphBitmapSize.iWidth, 8, x, y, glyphBitmapSize.iWidth, glyphBitmapSize.iHeight);
}
+ if (matrix.type() == QTransform::TxScale)
+ fe->setFontScale(1.0);
+
return;
}
#endif // Q_OS_SYMBIAN && QT_NO_FREETYPE
@@ -3269,7 +3274,9 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
}
#elif defined (Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) // Q_WS_WIN || Q_WS_MAC
- if (s->matrix.type() <= QTransform::TxTranslate) {
+ if (s->matrix.type() <= QTransform::TxTranslate
+ || (s->matrix.type() == QTransform::TxScale
+ && (qFuzzyCompare(s->matrix.m11(), s->matrix.m22())))) {
drawGlyphsS60(p, ti);
return;
}
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index f4af579..aab16cb 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2411,7 +2411,12 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
ret = 0;
break;
case PM_ToolBarFrameWidth:
- ret = 0;
+ ret = 1;
+ if (widget) {
+ if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(widget->parent()))
+ if (mainWindow->unifiedTitleAndToolBarOnMac())
+ ret = 0;
+ }
break;
default:
ret = QWindowsStyle::pixelMetric(metric, opt, widget);
@@ -4341,8 +4346,6 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
rect.setY(0);
rect.setHeight(widget->height());
}
- if (opt->direction == Qt::RightToLeft)
- rect.adjust(15, 0, -20, 0);
}
break;
case SE_ProgressBarGroove:
@@ -5717,12 +5720,16 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
case CT_ToolButton:
if (widget && qobject_cast<const QToolBar *>(widget->parentWidget())) {
- sz.rwidth() += 4;
- if (sz.height() <= 32) {
- // Workaround strange HIToolBar bug when getting constraints.
- sz.rheight() += 1;
+ if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(widget->parent())) {
+ if (mainWindow->unifiedTitleAndToolBarOnMac()) {
+ sz.rwidth() += 4;
+ if (sz.height() <= 32) {
+ // Workaround strange HIToolBar bug when getting constraints.
+ sz.rheight() += 1;
+ }
+ return sz;
+ }
}
- return sz;
}
sz.rwidth() += 10;
sz.rheight() += 10;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index a40a84c..fc435e8 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -92,10 +92,10 @@ static const qreal goldenRatio = 1.618;
const layoutHeader QS60StylePrivate::m_layoutHeaders[] = {
// *** generated layout data ***
-{240,320,1,15,"QVGA Landscape"},
-{320,240,1,15,"QVGA Portrait"},
-{360,640,1,15,"NHD Landscape"},
-{640,360,1,15,"NHD Portrait"},
+{240,320,1,16,"QVGA Landscape"},
+{320,240,1,16,"QVGA Portrait"},
+{360,640,1,16,"NHD Landscape"},
+{640,360,1,16,"NHD Portrait"},
{352,800,1,12,"E90 Landscape"}
// *** End of generated data ***
};
@@ -104,10 +104,10 @@ const int QS60StylePrivate::m_numberOfLayouts =
const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
-{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,3,3,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1},
-{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,4,4,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1},
-{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,5,5,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
-{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,5,5,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
+{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1},
+{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1},
+{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
+{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,-909,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1}
// *** End of generated data ***
};
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 4625667..9dd4af7 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -129,26 +129,62 @@ static inline unsigned int getChar(const QChar *str, int &i, const int len)
return uc;
}
+CFont *QFontEngineS60::fontWithSize(qreal size) const
+{
+ CFont *result = 0;
+ TFontSpec fontSpec(qt_QString2TPtrC(QFontEngine::fontDef.family), TInt(size));
+ fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
+ fontSpec.iFontStyle.SetPosture(QFontEngine::fontDef.style == QFont::StyleNormal?EPostureUpright:EPostureItalic);
+ fontSpec.iFontStyle.SetStrokeWeight(QFontEngine::fontDef.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal);
+ const TInt errorCode = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(result, fontSpec);
+ Q_ASSERT(result && (errorCode == 0));
+ return result;
+}
+
+void QFontEngineS60::setFontScale(qreal scale)
+{
+ if (qFuzzyCompare(scale, qreal(1))) {
+ if (!m_originalFont)
+ m_originalFont = fontWithSize(m_originalFontSizeInPixels);
+ m_activeFont = m_originalFont;
+ } else {
+ const qreal scaledFontSizeInPixels = m_originalFontSizeInPixels * scale;
+ if (!m_scaledFont ||
+ (TInt(scaledFontSizeInPixels) != TInt(m_scaledFontSizeInPixels))) {
+ releaseFont(m_scaledFont);
+ m_scaledFontSizeInPixels = scaledFontSizeInPixels;
+ m_scaledFont = fontWithSize(m_scaledFontSizeInPixels);
+ }
+ m_activeFont = m_scaledFont;
+ }
+}
+
+void QFontEngineS60::releaseFont(CFont *&font)
+{
+ if (font) {
+ S60->screenDevice()->ReleaseFont(font);
+ font = 0;
+ }
+}
+
QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Extensions *extensions)
: m_extensions(extensions)
+ , m_originalFont(0)
+ , m_originalFontSizeInPixels((request.pixelSize >= 0)?
+ request.pixelSize:pointsToPixels(request.pointSize))
+ , m_scaledFont(0)
+ , m_scaledFontSizeInPixels(0)
+ , m_activeFont(0)
{
QFontEngine::fontDef = request;
- m_fontSizeInPixels = (request.pixelSize >= 0)?
- request.pixelSize:pointsToPixels(request.pointSize);
-
- TFontSpec fontSpec(qt_QString2TPtrC(request.family), m_fontSizeInPixels);
- fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
- fontSpec.iFontStyle.SetPosture(request.style == QFont::StyleNormal?EPostureUpright:EPostureItalic);
- fontSpec.iFontStyle.SetStrokeWeight(request.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal);
- const TInt errorCode = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(m_font, fontSpec);
- Q_ASSERT(errorCode == 0);
-
+ setFontScale(1.0);
cache_cost = sizeof(QFontEngineS60);
}
QFontEngineS60::~QFontEngineS60()
{
- S60->screenDevice()->ReleaseFont(m_font);
+ releaseFont(m_originalFont);
+ releaseFont(m_scaledFont);
}
bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const
@@ -251,12 +287,12 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph)
QFixed QFontEngineS60::ascent() const
{
- return m_font->FontMaxAscent();
+ return m_originalFont->FontMaxAscent();
}
QFixed QFontEngineS60::descent() const
{
- return m_font->FontMaxDescent();
+ return m_originalFont->FontMaxDescent();
}
QFixed QFontEngineS60::leading() const
@@ -266,7 +302,7 @@ QFixed QFontEngineS60::leading() const
qreal QFontEngineS60::maxCharWidth() const
{
- return m_font->MaxCharWidthInPixels();
+ return m_originalFont->MaxCharWidthInPixels();
}
const char *QFontEngineS60::name() const
@@ -302,11 +338,11 @@ void QFontEngineS60::getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metri
const TUint specialCode = (TUint)glyph | 0x80000000;
const CFont::TCharacterDataAvailability availability =
- m_font->GetCharacterData(specialCode, metrics, bitmap, bitmapSize);
+ m_activeFont->GetCharacterData(specialCode, metrics, bitmap, bitmapSize);
const glyph_t fallbackGlyph = '?';
if (availability != CFont::EAllCharacterData) {
const CFont::TCharacterDataAvailability fallbackAvailability =
- m_font->GetCharacterData(fallbackGlyph, metrics, bitmap, bitmapSize);
+ m_activeFont->GetCharacterData(fallbackGlyph, metrics, bitmap, bitmapSize);
Q_ASSERT(fallbackAvailability == CFont::EAllCharacterData);
}
}
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 4748497..78f8a9a 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -117,15 +117,21 @@ public:
Type type() const;
void getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metrics, const TUint8*& bitmap, TSize& bitmapSize) const;
+ void setFontScale(qreal scale);
private:
friend class QFontPrivate;
QFixed glyphAdvance(HB_Glyph glyph) const;
+ CFont *fontWithSize(qreal size) const;
+ static void releaseFont(CFont *&font);
- CFont* m_font;
const QFontEngineS60Extensions *m_extensions;
- qreal m_fontSizeInPixels;
+ CFont* m_originalFont;
+ const qreal m_originalFontSizeInPixels;
+ CFont* m_scaledFont;
+ qreal m_scaledFontSizeInPixels;
+ CFont* m_activeFont;
};
class QFontEngineMultiS60 : public QFontEngineMulti
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 1622191..269cd12 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -119,8 +119,6 @@ void QMainWindowPrivate::init()
q->setAttribute(Qt::WA_Hover);
#ifdef QT_SOFTKEYS_ENABLED
menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q);
- menuBarAction->setObjectName(QLatin1String("_q_menuSoftKeyAction"));
- menuBarAction->setVisible(false);
#endif
}
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index b7272f7..aaed6b1 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_MENU
#ifdef Q_WS_S60
+void qt_symbian_next_menu_from_action(QWidget* actionContainer);
void qt_symbian_show_toplevel(CEikMenuPane* menuPane);
void qt_symbian_show_submenu(CEikMenuPane* menuPane, int id);
#endif // Q_WS_S60
@@ -87,7 +88,7 @@ QT_BEGIN_NAMESPACE
typedef void NSMenuItem;
# endif //__OBJC__
struct QMacMenuAction {
- QMacMenuAction()
+ QMacMenuAction()
#ifndef QT_MAC_USE_COCOA
: command(0)
#else
@@ -124,7 +125,7 @@ typedef QList<QMenuMergeItem> QMenuMergeList;
#ifdef Q_WS_WINCE
struct QWceMenuAction {
- uint command;
+ uint command;
QPointer<QAction> action;
HMENU menuHandle;
QWceMenuAction() : menuHandle(0), command(0) {}
@@ -340,7 +341,7 @@ public:
QList<QWceMenuAction*> actionItems;
HMENU menuHandle;
QWceMenuPrivate();
- ~QWceMenuPrivate();
+ ~QWceMenuPrivate();
void addAction(QAction *, QWceMenuAction* =0);
void addAction(QWceMenuAction *, QWceMenuAction* =0);
void syncAction(QWceMenuAction *);
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index 28b27d4..eae97a6 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -81,6 +81,7 @@ static QList<QMenuBar*> nativeMenuBars;
static uint qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM;
static QPointer<QWidget> widgetWithContextMenu;
static QList<QAction*> contextMenuActionList;
+static QWidget* actionMenu = NULL;
static int contexMenuCommand=0;
bool menuExists()
@@ -224,8 +225,26 @@ static void rebuildMenu()
}
#ifdef Q_WS_S60
+void qt_symbian_next_menu_from_action(QWidget *actionContainer)
+{
+ actionMenu = actionContainer;
+}
+
void qt_symbian_show_toplevel( CEikMenuPane* menuPane)
{
+ if (actionMenu) {
+ QMenuBarPrivate *mb = 0;
+ mb = menubars()->value(actionMenu);
+ qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM;
+ deleteAll( &symbianMenus );
+ Q_ASSERT(mb);
+ mb->symbian_menubar->rebuild();
+ for (int i = 0; i < symbianMenus.count(); ++i)
+ QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData));
+ actionMenu = NULL;
+ return;
+ }
+
if (!menuExists())
return;
rebuildMenu();
@@ -271,10 +290,16 @@ int QMenuBarPrivate::symbianCommands(int command)
void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent)
{
Q_Q(QMenuBar);
- if (parent && parent->isWindow()){
- menubars()->insert(q->window(), this);
- symbian_menubar = new QSymbianMenuBarPrivate(this);
- nativeMenuBars.append(q);
+ if (parent) {
+ if(parent->isWindow()) {
+ menubars()->insert(q->window(), this);
+ symbian_menubar = new QSymbianMenuBarPrivate(this);
+ nativeMenuBars.append(q);
+ } else {
+ menubars()->insert(q->parentWidget(), this);
+ symbian_menubar = new QSymbianMenuBarPrivate(this);
+ nativeMenuBars.append(q);
+ }
}
}
@@ -284,6 +309,7 @@ void QMenuBarPrivate::symbianDestroyMenuBar()
int index = nativeMenuBars.indexOf(q);
nativeMenuBars.removeAt(index);
menubars()->remove(q->window(), this);
+ menubars()->remove(q->parentWidget(), this);
rebuildMenu();
if (symbian_menubar)
delete symbian_menubar;
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 0e14385..9caadb7 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -667,7 +667,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\i Application Menu | About <application name>
\i The application name is fetched from the \c {Info.plist} file
(see note below). If this entry is not found no About item
- will appear in the Application Menu.
+ will appear in the Application Menu.
\row \i config, options, setup, settings or preferences
\i Application Menu | Preferences
\i If this entry is not found the Settings item will be disabled
diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp
index 747a227..45b15ef 100644
--- a/src/gui/widgets/qprintpreviewwidget.cpp
+++ b/src/gui/widgets/qprintpreviewwidget.cpp
@@ -151,7 +151,11 @@ class GraphicsView : public QGraphicsView
public:
GraphicsView(QWidget* parent = 0)
: QGraphicsView(parent)
- {}
+ {
+#ifdef Q_WS_MAC
+ setFrameStyle(QFrame::NoFrame);
+#endif
+ }
signals:
void resized();
diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp
index c2cc69c..669f9cf 100644
--- a/src/network/access/qhttpnetworkheader.cpp
+++ b/src/network/access/qhttpnetworkheader.cpp
@@ -80,7 +80,7 @@ QByteArray QHttpNetworkHeaderPrivate::headerField(const QByteArray &name, const
QByteArray result;
bool first = true;
- foreach (QByteArray value, allValues) {
+ foreach (const QByteArray &value, allValues) {
if (!first)
result += ", ";
first = false;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 58123b2..61a95fe 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -753,7 +753,7 @@ void QNetworkAccessHttpBackend::replyHeaderChanged()
QByteArray value = rawHeader(it->first);
if (!value.isEmpty()) {
if (qstricmp(it->first.constData(), "set-cookie") == 0)
- value += "\n";
+ value += '\n';
else
value += ", ";
}
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 6dcd05d..a2bef67 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -649,7 +649,7 @@ static QVariant parseCookieHeader(const QByteArray &raw)
{
QList<QNetworkCookie> result;
QList<QByteArray> cookieList = raw.split(';');
- foreach (QByteArray cookie, cookieList) {
+ foreach (const QByteArray &cookie, cookieList) {
QList<QNetworkCookie> parsed = QNetworkCookie::parseCookies(cookie.trimmed());
if (parsed.count() != 1)
return QVariant(); // invalid Cookie: header
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 193a043..e4023c8 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -270,7 +270,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
break;
case Ntlm:
// #### extract from header
- realm = QString();
+ realm.clear();
break;
case DigestMd5: {
realm = QString::fromLatin1(options.value("realm"));
@@ -281,7 +281,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
break;
}
default:
- realm = QString();
+ realm.clear();
challenge = QByteArray();
phase = Invalid;
}
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index 367e3c4..1115c63 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -541,7 +541,7 @@ QList<QNetworkInterface> QNetworkInterface::allInterfaces()
{
QList<QSharedDataPointer<QNetworkInterfacePrivate> > privs = manager()->allInterfaces();
QList<QNetworkInterface> result;
- foreach (QSharedDataPointer<QNetworkInterfacePrivate> p, privs) {
+ foreach (const QSharedDataPointer<QNetworkInterfacePrivate> &p, privs) {
QNetworkInterface item;
item.d = p;
result << item;
@@ -560,7 +560,7 @@ QList<QHostAddress> QNetworkInterface::allAddresses()
{
QList<QSharedDataPointer<QNetworkInterfacePrivate> > privs = manager()->allInterfaces();
QList<QHostAddress> result;
- foreach (const QSharedDataPointer<QNetworkInterfacePrivate> p, privs) {
+ foreach (const QSharedDataPointer<QNetworkInterfacePrivate> &p, privs) {
foreach (const QNetworkAddressEntry &entry, p->addressEntries)
result += entry.ip();
}
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index ede3c89..ef7fc02 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -122,9 +122,9 @@ void QLocalServer::close()
qDeleteAll(d->pendingConnections);
d->pendingConnections.clear();
d->closeServer();
- d->serverName = QString();
- d->fullServerName = QString();
- d->errorString = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
+ d->errorString.clear();
d->error = QAbstractSocket::UnknownSocketError;
}
@@ -226,8 +226,8 @@ bool QLocalServer::listen(const QString &name)
}
if (!d->listen(name)) {
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
return false;
}
diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp
index 9f574d4..5b5e84f 100644
--- a/src/network/socket/qlocalsocket_tcp.cpp
+++ b/src/network/socket/qlocalsocket_tcp.cpp
@@ -102,8 +102,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
switch(newState) {
case QAbstractSocket::UnconnectedState:
state = QLocalSocket::UnconnectedState;
- serverName = QString();
- fullServerName = QString();
+ serverName.clear();
+ fullServerName.clear();
break;
case QAbstractSocket::ConnectingState:
state = QLocalSocket::ConnectingState;
@@ -218,7 +218,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
|| state() == ConnectingState)
return;
- d->errorString = QString();
+ d->errorString.clear();
d->state = ConnectingState;
emit stateChanged(d->state);
@@ -333,8 +333,8 @@ void QLocalSocket::close()
{
Q_D(QLocalSocket);
d->tcpSocket->close();
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
QIODevice::close();
}
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 73c2465..1ca11d8 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -109,8 +109,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
switch(newState) {
case QAbstractSocket::UnconnectedState:
state = QLocalSocket::UnconnectedState;
- serverName = QString();
- fullServerName = QString();
+ serverName.clear();
+ fullServerName.clear();
break;
case QAbstractSocket::ConnectingState:
state = QLocalSocket::ConnectingState;
@@ -225,7 +225,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
|| state() == ConnectingState)
return;
- d->errorString = QString();
+ d->errorString.clear();
d->unixSocket.setSocketState(QAbstractSocket::ConnectingState);
d->state = ConnectingState;
emit stateChanged(d->state);
@@ -341,7 +341,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
errorOccurred(QLocalSocket::UnknownSocketError, function);
}
connectingSocket = -1;
- connectingName = QString();
+ connectingName.clear();
connectingOpenMode = 0;
}
@@ -438,10 +438,10 @@ void QLocalSocket::close()
if (d->connectingSocket != -1)
::close(d->connectingSocket);
d->connectingSocket = -1;
- d->connectingName = QString();
+ d->connectingName.clear();
d->connectingOpenMode = 0;
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
QIODevice::close();
}
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 9a9b1b5..fd647e2 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -634,11 +634,11 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi
QByteArray tmp;
for (int i = 0; i <= array.size() - 64; i += 64) {
tmp += QByteArray::fromRawData(array.data() + i, 64);
- tmp += "\n";
+ tmp += '\n';
}
if (int remainder = array.size() % 64) {
tmp += QByteArray::fromRawData(array.data() + array.size() - remainder, remainder);
- tmp += "\n";
+ tmp += '\n';
}
return BEGINCERTSTRING "\n" + tmp + ENDCERTSTRING "\n";
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 6947aa7..9623570 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1109,7 +1109,7 @@ void QSslSocket::setCiphers(const QString &ciphers)
{
Q_D(QSslSocket);
d->configuration.ciphers.clear();
- foreach (QString cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
+ foreach (const QString &cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
for (int i = 0; i < 3; ++i) {
// ### Crude
QSslCipher cipher(cipherName, QSsl::SslProtocol(i));
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 892d330..ce2aee1 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -818,7 +818,7 @@ bool QSslSocketBackendPrivate::startHandshake()
QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.exactMatch(peerName)) {
bool matched = false;
- foreach (QString altName, configuration.peerCertificate
+ foreach (const QString &altName, configuration.peerCertificate
.alternateSubjectNames().values(QSsl::DnsEntry)) {
regexp.setPattern(altName);
if (regexp.exactMatch(peerName)) {
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index cc0e5a1..3087b77 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -46,11 +46,13 @@
#include "qvgimagepool_p.h"
#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
+#include <private/qt_s60_p.h>
+#include <fbs.h>
#include <graphics/sgimage.h>
typedef EGLImageKHR (*pfnEglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, EGLint*);
typedef EGLBoolean (*pfnEglDestroyImageKHR)(EGLDisplay, EGLImageKHR);
typedef VGImage (*pfnVgCreateEGLImageTargetKHR)(VGeglImageKHR);
-#endif
+#endif // QT_SYMBIAN_SUPPORTS_SGIMAGE
QT_BEGIN_NAMESPACE
@@ -425,6 +427,34 @@ Q_OPENVG_EXPORT VGImage qPixmapToVGImage(const QPixmap& pixmap)
}
#if defined(Q_OS_SYMBIAN)
+
+static CFbsBitmap* createBlitCopy(CFbsBitmap* bitmap)
+{
+ CFbsBitmap *copy = q_check_ptr(new CFbsBitmap);
+ if(!copy)
+ return 0;
+
+ if (copy->Create(bitmap->SizeInPixels(), bitmap->DisplayMode()) != KErrNone) {
+ delete copy;
+ copy = 0;
+
+ return 0;
+ }
+
+ CFbsBitmapDevice* bitmapDevice = 0;
+ CFbsBitGc *bitmapGc = 0;
+ QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(copy));
+ QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL());
+ bitmapGc->Activate(bitmapDevice);
+
+ bitmapGc->BitBlt(TPoint(), bitmap);
+
+ delete bitmapGc;
+ delete bitmapDevice;
+
+ return copy;
+}
+
void QVGPixmapData::cleanup()
{
is_null = w = h = 0;
@@ -510,7 +540,49 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
eglDestroyImageKHR(context->display(), eglImage);
SgDriver::Close();
} else if (type == QPixmapData::FbsBitmap) {
+ CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
+
+ bool deleteSourceBitmap = false;
+
+#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
+
+ // Rasterize extended bitmaps
+
+ TUid extendedBitmapType = bitmap->ExtendedBitmapType();
+ if (extendedBitmapType != KNullUid) {
+ bitmap = createBlitCopy(bitmap);
+ deleteSourceBitmap = true;
+ }
+#endif
+
+ if (bitmap->IsCompressedInRAM()) {
+ bitmap = createBlitCopy(bitmap);
+ deleteSourceBitmap = true;
+ }
+
+ TDisplayMode displayMode = bitmap->DisplayMode();
+ QImage::Format format = qt_TDisplayMode2Format(displayMode);
+
+ TSize size = bitmap->SizeInPixels();
+
+ bitmap->BeginDataAccess();
+ uchar *bytes = (uchar*)bitmap->DataAddress();
+ QImage img = QImage(bytes, size.iWidth, size.iHeight, format);
+ img = img.copy();
+ bitmap->EndDataAccess();
+
+ if(displayMode == EGray2) {
+ //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid
+ //So invert mono bitmaps so that masks work correctly.
+ img.invertPixels();
+ } else if(displayMode == EColor16M) {
+ img = img.rgbSwapped(); // EColor16M is BGR
+ }
+
+ fromImage(img, Qt::AutoColor);
+ if(deleteSourceBitmap)
+ delete bitmap;
}
#else
Q_UNUSED(pixmap);
@@ -593,7 +665,25 @@ void* QVGPixmapData::toNativeType(NativeType type)
SgDriver::Close();
return reinterpret_cast<void*>(sgImage);
} else if (type == QPixmapData::FbsBitmap) {
- return 0;
+ CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);
+
+ if (bitmap) {
+ if (bitmap->Create(TSize(source.width(), source.height()),
+ EColor16MAP) == KErrNone) {
+ const uchar *sptr = qt_vg_imageBits(source);
+ bitmap->BeginDataAccess();
+
+ uchar *dptr = (uchar*)bitmap->DataAddress();
+ Mem::Copy(dptr, sptr, source.byteCount());
+
+ bitmap->EndDataAccess();
+ } else {
+ delete bitmap;
+ bitmap = 0;
+ }
+ }
+
+ return reinterpret_cast<void*>(bitmap);
}
#else
Q_UNUSED(type);
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index da65230..155e3e7 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -5527,7 +5527,7 @@ EXPORTS
?invalidateChildrenSceneTransform@QGraphicsItemPrivate@@QAEXXZ @ 5526 NONAME ; void QGraphicsItemPrivate::invalidateChildrenSceneTransform(void)
?invalidateDepthRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5527 NONAME ; void QGraphicsItemPrivate::invalidateDepthRecursively(void)
?invalidateFilter@QSortFilterProxyModel@@IAEXXZ @ 5528 NONAME ; void QSortFilterProxyModel::invalidateFilter(void)
- ?invalidateGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5529 NONAME ; void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively(void)
+ ?invalidateGraphicsEffectsRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5529 NONAME ABSENT ; void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively(void)
?invalidateGraphicsEffectsRecursively@QWidgetPrivate@@QAEXXZ @ 5530 NONAME ; void QWidgetPrivate::invalidateGraphicsEffectsRecursively(void)
?invalidateScene@QGraphicsView@@QAEXABVQRectF@@V?$QFlags@W4SceneLayer@QGraphicsScene@@@@@Z @ 5531 NONAME ; void QGraphicsView::invalidateScene(class QRectF const &, class QFlags<enum QGraphicsScene::SceneLayer>)
?invalidateSizeCache@QWidgetItemV2@@AAEXXZ @ 5532 NONAME ; void QWidgetItemV2::invalidateSizeCache(void)
@@ -9555,7 +9555,7 @@ EXPORTS
?setParent@QWidget@@QAEXPAV1@@Z @ 9554 NONAME ; void QWidget::setParent(class QWidget *)
?setParent@QWidget@@QAEXPAV1@V?$QFlags@W4WindowType@Qt@@@@@Z @ 9555 NONAME ; void QWidget::setParent(class QWidget *, class QFlags<enum Qt::WindowType>)
?setParentItem@QGraphicsItem@@QAEXPAV1@@Z @ 9556 NONAME ; void QGraphicsItem::setParentItem(class QGraphicsItem *)
- ?setParentItemHelper@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9557 NONAME ; void QGraphicsItemPrivate::setParentItemHelper(class QGraphicsItem *)
+ ?setParentItemHelper@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9557 NONAME ABSENT ; void QGraphicsItemPrivate::setParentItemHelper(class QGraphicsItem *)
?setParentLayoutItem@QGraphicsLayoutItem@@QAEXPAV1@@Z @ 9558 NONAME ; void QGraphicsLayoutItem::setParentLayoutItem(class QGraphicsLayoutItem *)
?setParent_sys@QWidgetPrivate@@QAEXPAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z @ 9559 NONAME ; void QWidgetPrivate::setParent_sys(class QWidget *, class QFlags<enum Qt::WindowType>)
?setPasswordCharacter@QLineControl@@QAEXABVQChar@@@Z @ 9560 NONAME ; void QLineControl::setPasswordCharacter(class QChar const &)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 05f620c..a9a69aa 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -4671,7 +4671,7 @@ EXPORTS
_ZN20QGraphicsItemPrivate18setTransformHelperERK10QTransform @ 4670 NONAME
_ZN20QGraphicsItemPrivate18subFocusItemChangeEv @ 4671 NONAME
_ZN20QGraphicsItemPrivate18updateAncestorFlagEN13QGraphicsItem16GraphicsItemFlagENS_12AncestorFlagEbb @ 4672 NONAME
- _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItem @ 4673 NONAME
+ _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItem @ 4673 NONAME ABSENT
_ZN20QGraphicsItemPrivate20removeExtraItemCacheEv @ 4674 NONAME
_ZN20QGraphicsItemPrivate23appendGraphicsTransformEP18QGraphicsTransform @ 4675 NONAME
_ZN20QGraphicsItemPrivate25movableAncestorIsSelectedEPK13QGraphicsItem @ 4676 NONAME
@@ -11639,7 +11639,7 @@ EXPORTS
_ZN19QGraphicsBlurEffect4drawEP8QPainter @ 11638 NONAME
_ZN19QKeyEventTransition15setModifierMaskE6QFlagsIN2Qt16KeyboardModifierEE @ 11639 NONAME
_ZN20QGraphicsItemPrivate18siblingOrderChangeEv @ 11640 NONAME
- _ZN20QGraphicsItemPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11641 NONAME
+ _ZN20QGraphicsItemPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11641 NONAME ABSENT
_ZN21QMouseEventTransition14setHitTestPathERK12QPainterPath @ 11642 NONAME
_ZN21QMouseEventTransition15setModifierMaskE6QFlagsIN2Qt16KeyboardModifierEE @ 11643 NONAME
_ZN22QGraphicsOpacityEffect4drawEP8QPainter @ 11644 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index aaecf6c..5318693 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -114,6 +114,10 @@ symbian: {
graphicssystems_plugins.sources += qvggraphicssystem.dll
}
+ contains(QT_CONFIG, multimedia) {
+ qtlibraries.sources += QtMultimedia.dll
+ }
+
BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)"
BLD_INF_RULES.prj_exports += "qtdemoapps.iby $$CORE_APP_LAYER_IBY_EXPORT_PATH(qtdemoapps.iby)"
}
diff --git a/src/s60installs/sqlite3.sis b/src/s60installs/sqlite3.sis
index 1785365..11e069e 100644
--- a/src/s60installs/sqlite3.sis
+++ b/src/s60installs/sqlite3.sis
Binary files differ
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index e41cd55..1f6e58f 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -544,6 +544,8 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file)
const QString filename = nodes.at(nodes.size()-1);
RCCFileInfo *s = new RCCFileInfo(file);
s->m_parent = parent;
+ if (parent->m_children.contains(filename))
+ qWarning("potential duplicate alias detected: '%s'", qPrintable(filename));
parent->m_children.insertMulti(filename, s);
return true;
}
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index c674202..ef92c56 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -92,6 +92,9 @@ void tst_MakeTestSelfTest::auto_dot_pro_data()
QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot);
foreach (const QString& subdir, subdirs) {
+ if (subdir == QString::fromLatin1("tmp")) {
+ continue;
+ }
QTest::newRow(qPrintable(subdir)) << subdir;
}
}
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 8bcd5e8..d7c6ad3 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -145,9 +145,11 @@ private slots:
void fromWinHICON();
#endif
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
void fromSymbianCFbsBitmap_data();
void fromSymbianCFbsBitmap();
+ void toSymbianCFbsBitmap_data();
+ void toSymbianCFbsBitmap();
#endif
void onlyNullPixmapsOutsideGuiThread();
@@ -1110,7 +1112,7 @@ void tst_QPixmap::fromWinHICON()
#endif // Q_WS_WIN
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
Q_DECLARE_METATYPE(TDisplayMode)
void tst_QPixmap::fromSymbianCFbsBitmap_data()
@@ -1206,6 +1208,45 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
CleanupStack::PopAndDestroy(3);
}
+
+void tst_QPixmap::toSymbianCFbsBitmap_data()
+{
+ QTest::addColumn<int>("red");
+ QTest::addColumn<int>("green");
+ QTest::addColumn<int>("blue");
+
+ QTest::newRow("red") << 255 << 0 << 0;
+ QTest::newRow("green") << 0 << 255 << 0;
+ QTest::newRow("blue") << 0 << 0 << 255;
+}
+
+void tst_QPixmap::toSymbianCFbsBitmap()
+{
+ QFETCH(int, red);
+ QFETCH(int, green);
+ QFETCH(int, blue);
+
+ QPixmap pm(100, 100);
+ pm.fill(QColor(red, green, blue));
+
+ CFbsBitmap *bitmap = pm.toSymbianCFbsBitmap();
+
+ QVERIFY(bitmap != 0);
+
+ // Verify size
+ QCOMPARE(100, (int) bitmap->SizeInPixels().iWidth);
+ QCOMPARE(100, (int) bitmap->SizeInPixels().iHeight);
+
+ // Verify pixel color
+ TRgb pixel;
+ bitmap->GetPixel(pixel, TPoint(0,0));
+ QCOMPARE((int)pixel.Red(), red);
+ QCOMPARE((int)pixel.Green(), green);
+ QCOMPARE((int)pixel.Blue(), blue);
+
+ // Clean up
+ delete bitmap;
+}
#endif
void tst_QPixmap::onlyNullPixmapsOutsideGuiThread()
diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro
index 9efde80..1588cc5 100644
--- a/tests/auto/qscriptvalue/qscriptvalue.pro
+++ b/tests/auto/qscriptvalue/qscriptvalue.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
QT = core gui script
SOURCES += tst_qscriptvalue.cpp
+HEADERS += tst_qscriptvalue.h
-
+# Generated by testgen
+SOURCES += tst_qscriptvalue_generated.cpp
diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt
new file mode 100644
index 0000000..8e7026e
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/data.txt
@@ -0,0 +1,116 @@
+# Data set for QScriptValue autotest.
+
+# Each line is a c++ code that should return a QScriptValue object.
+# Lines that are empty or start with '#' will be ignored
+
+QScriptValue()
+
+#Unbound values
+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"))
+
+#Unbound values (bound to a null engine)
+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"))
+
+#Bound values
+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"))
+
+# evaluate
+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()")
diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py
new file mode 100755
index 0000000..c14fe86
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/gen.py
@@ -0,0 +1,219 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+## $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$
+
+from __future__ import with_statement
+from string import Template
+
+class Options():
+ """Option manager. It parse and check all paramteres, set internal variables."""
+ def __init__(self, args):
+ import logging as log
+ log.basicConfig()
+ #comand line options parser
+ from optparse import OptionParser
+ #load some directory searching stuff
+ import os.path, sys
+
+ opt = OptionParser("%prog [options] path_to_input_file path_to_output_file.")
+
+ self._o, self._a = opt.parse_args(args)
+
+ try:
+ if not (os.path.exists(self._a[0])):
+ raise Exception("Path doesn't exist")
+ if len(self._a) != 2:
+ raise IndexError("Only two files!")
+ self._o.ipath = self._a[0]
+ self._o.opath = self._a[1]
+ except IndexError:
+ log.error("Bad usage. Please try -h or --help")
+ sys.exit(1)
+ except Exception:
+ log.error("Path '" + self._a[0] + " or " + self._a[1] + "' don't exist")
+ sys.exit(2)
+
+ def __getattr__(self, attr):
+ """map all options properties into this object (remove one level of indirection)"""
+ return getattr(self._o, attr)
+
+
+mainTempl = Template("""/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+////////////////////////////////////////////////////////////////
+// THIS FILE IS AUTOGENERATED, ALL MODIFICATIONS WILL BE LAST //
+////////////////////////////////////////////////////////////////
+
+#include "testgenerator.h"
+
+#include <QtCore/qdatastream.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qvector.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtScript/qscriptengine.h>
+
+
+
+typedef bool (QScriptValue::*ComparisionType) (const QScriptValue&) const;
+static QVector<bool> compare(ComparisionType compare, QScriptValue value, const QScriptValueList& values) {
+ QVector<bool> result;
+ result.reserve(${count});
+
+ QScriptValueList::const_iterator i = values.constBegin();
+ for (; i != values.constEnd(); ++i) {
+ result << (value.*compare)(*i);
+ }
+ return result;
+}
+
+static void dump(QDataStream& out, QScriptValue& value, const QString& expression, const QScriptValueList& allValues)
+{
+ out << QString(expression);
+
+ out << value.isValid();
+ out << value.isBool();
+ out << value.isBoolean();
+ out << value.isNumber();
+ out << value.isFunction();
+ out << value.isNull();
+ out << value.isString();
+ out << value.isUndefined();
+ out << value.isVariant();
+ out << value.isQObject();
+ out << value.isQMetaObject();
+ out << value.isObject();
+ out << value.isDate();
+ out << value.isRegExp();
+ out << value.isArray();
+ out << value.isError();
+
+ out << value.toString();
+ out << value.toNumber();
+ out << value.toBool();
+ out << value.toBoolean();
+ out << value.toInteger();
+ out << value.toInt32();
+ out << value.toUInt32();
+ out << value.toUInt16();
+
+ out << compare(&QScriptValue::equals, value, allValues);
+ out << compare(&QScriptValue::strictlyEquals, value, allValues);
+ out << compare(&QScriptValue::lessThan, value, allValues);
+ out << compare(&QScriptValue::instanceOf, value, allValues);
+
+ out << qscriptvalue_cast<QString>(value);
+ out << qscriptvalue_cast<qsreal>(value);
+ out << qscriptvalue_cast<bool>(value);
+ out << qscriptvalue_cast<qint32>(value);
+ out << qscriptvalue_cast<quint32>(value);
+ out << qscriptvalue_cast<quint16>(value);
+}
+
+void TestGenerator::prepareData()
+{
+ QScriptEngine* engine = new QScriptEngine;
+
+ QScriptValueList allValues;
+ allValues << ${values};
+ QVector<QString> allDataTags;
+ allDataTags.reserve(${count});
+ allDataTags << ${dataTags};
+ QDataStream out(&m_tempFile);
+ out << allDataTags;
+
+ for(unsigned i = 0; i < ${count}; ++i)
+ dump(out, allValues[i], allDataTags[i], allValues);
+
+ delete engine;
+}
+""")
+qsvTempl = Template("""
+ {
+ QScriptValue value = ${expr};
+ dump(out, value, "${expr_esc}", allValues);
+ }""")
+
+
+
+if __name__ == '__main__':
+ import sys
+ o = Options(sys.argv[1:])
+ out = []
+ qsv = []
+ # load input file
+ with open(o.ipath) as f:
+ for row in f.readlines():
+ qsv.append(row)
+
+ #skip comments and empty lines
+ qsv = filter(lambda w: len(w.strip()) and not w.startswith('#'), qsv)
+
+ escape = lambda w: w.replace('\\','\\\\').replace('"','\\"')
+
+ for row in qsv:
+ row = row.replace('\n','')
+ row_esc = escape(row)
+ out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc))
+
+ result = mainTempl.substitute(dump= "".join(out) \
+ , values = (11 * ' ' + '<< ').join(qsv) \
+ , count = len(qsv) \
+ , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv)))
+
+ with open(o.opath, 'w') as f:
+ f.write(result)
+
+
diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp
new file mode 100644
index 0000000..fe35de9
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** 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 "testgenerator.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/QCoreApplication>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+ if (argc != 2) {
+ qWarning() << "./prog outputfile";
+ exit(1);
+ }
+
+ //Procced
+ TestGenerator gen(a.arguments()[1]);
+ gen.run();
+
+ return 0;
+}
diff --git a/tests/auto/qscriptvalue/testgen/testgen.pro b/tests/auto/qscriptvalue/testgen/testgen.pro
new file mode 100644
index 0000000..47709a8
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgen.pro
@@ -0,0 +1,18 @@
+QT += core script
+TARGET = testgen
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ testgenerator.cpp
+HEADERS += testgenerator.h
+
+
+INPUT_DATASET = data.txt
+dataset.name = Generating QScraiptValue autotest's dataset
+dataset.output = autogenerated.cpp
+dataset.commands = python gen.py data.txt autogenerated.cpp
+dataset.input = INPUT_DATASET
+dataset.variable_out = SOURCES
+QMAKE_EXTRA_COMPILERS += dataset
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
new file mode 100644
index 0000000..d852ea5
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
@@ -0,0 +1,688 @@
+/****************************************************************************
+**
+** 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 "testgenerator.h"
+
+#include <QtCore/qdatastream.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qtextstream.h>
+#include <QtCore/qvariant.h>
+#include <QtScript/qscriptvalue.h>
+
+void TestGenerator::save(const QString& data)
+{
+ QTextStream out(&m_ofile);
+ out << data;
+}
+
+static QString escape(QString txt)
+{
+ return txt.replace("\\","\\\\").replace("\"","\\\"").replace("\n","\\n");
+}
+
+template<typename T>
+QString prepareToInsert(T value) {return QString::fromAscii("\"") + escape(value) + "\"";}
+template<>
+QString prepareToInsert<qsreal>(qsreal value)
+{
+ if (qIsNaN(value))
+ return "qQNaN()";
+ if (qIsInf(value))
+ return "qInf()";
+ return QString::number(value, 'g', 16);
+}
+template<>
+QString prepareToInsert<qint32>(qint32 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<quint32>(quint32 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<quint16>(quint16 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<bool>(bool value) {return value ? "true" : "false";}
+template<>
+QString prepareToInsert<QString>(QString value) {return QString::fromAscii("\"") + escape(value) + "\"";}
+
+template<typename T>
+QString typeName() {return QString();}
+template<>
+QString typeName<qsreal>() {return "qsreal";}
+template<>
+QString typeName<qint32>() {return "qint32";}
+template<>
+QString typeName<quint32>() {return "quint32";}
+template<>
+QString typeName<quint16>() {return "quint16";}
+template<>
+QString typeName<bool>() {return "bool";}
+template<>
+QString typeName<QString>() {return "QString";}
+
+static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
+{
+ static const QString templ("void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<bool>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QSet<QString> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ " %1%2\n"\
+ " }\n"\
+ " newRow(expr) << %1.contains(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(bool, expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n"\
+ "\n");
+
+ if (!list.size()) {
+ qWarning() << name << ": nothing to add!" ;
+ return QString();
+ }
+
+ 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.append(";");
+ return result.arg(name, set.join(QString()));
+}
+
+template<typename T>
+static QString generateToXXXDef(const QString& name, const QList<QPair<QString, T> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << %1.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ QString result = templ;
+
+ typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
+ QStringList set;
+ 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"));
+ }
+ return result.arg(name, typeName<T>(), set.join(QString()));
+}
+
+
+template<>
+QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, qsreal> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << %1.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ "%666"
+ " if (qIsInf(expected)) {\n"\
+ " QVERIFY(qIsInf(value.%1()));\n"\
+ " return;\n"\
+ " }\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ QString result = templ;
+
+ QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
+ QStringList set;
+ 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"));
+ }
+ // toInteger shouldn't return NaN, so it would be nice to catch the case.
+ QString hook;
+ if (name == "toNumber") {
+ hook =
+ " if (qIsNaN(expected)) {\n"\
+ " QVERIFY(qIsNaN(value.toNumber()));\n"\
+ " return;\n"\
+ " }\n";
+ }
+ return result.arg(name, typeName<qsreal>(), set.join(QString()), 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"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> value;\n"\
+ " if (value.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << value.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ QString result = templ;
+
+ typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
+ QStringList set;
+ 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"));
+ }
+ return result.arg(typeName<T>(), set.join(QString()));
+}
+
+template<>
+QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> value;\n"\
+ " if (value.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << value.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " if (qIsNaN(expected)) {\n"
+ " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n"
+ " return;\n"
+ " }\n"\
+ " if (qIsInf(expected)) {\n"
+ " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n"
+ " return;\n"
+ " }\n"
+ " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ QString result = templ;
+
+ QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
+ QStringList set;
+ 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"));
+ }
+ return result.arg(typeName<qsreal>(), set.join(QString()));
+}
+
+static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<QScriptValue>(\"other\");\n"\
+ " QTest::addColumn<bool>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char *expr)\n"\
+ "{\n"\
+ " static QSet<QString> equals;\n"\
+ " if (equals.isEmpty()) {\n"\
+ "%2\n"\
+ " }\n"\
+ " QHash<QString, QScriptValue>::const_iterator it;\n"\
+ " for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\
+ " QString tag = QString::fromLatin1(\"%20 <=> %21\").arg(expr).arg(it.key());\n"\
+ " newRow(tag.toLatin1()) << it.value() << equals.contains(tag);\n"\
+ " }\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char *, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(QScriptValue, other);\n"\
+ " QFETCH(bool, expected);\n"\
+ " QCOMPARE(value.%1(other), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ Q_ASSERT(comparisionType == "strictlyEquals"
+ || comparisionType == "equals"
+ || comparisionType == "lessThan"
+ || comparisionType == "instanceOf");
+ QString result = templ;
+
+ QStringList set;
+ foreach(const QString& tmp, tags) {
+ set.append(" equals.insert(\"" + escape(tmp) + "\");");
+ }
+ return result.arg(comparisionType, set.join("\n"));
+}
+
+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"\
+ "{\n"\
+ " m_values.clear();\n"\
+ " if (engine) \n"\
+ " delete engine;\n"\
+ " engine = new QScriptEngine;\n"\
+ "%1\n}\n\n";
+ QString result = templ;
+ QStringList set;
+ foreach(const QString tag, allDataTags) {
+ set.append(" DEFINE_TEST_VALUE(" + tag + ");");
+ }
+
+ return result.arg(set.join("\n"));
+}
+
+static void squashTags(QString dataTag, const QVector<bool>& results, QList<QString>& tags, QVector<QString> dataTags)
+{
+ for(int i = 0; i < results.count(); ++i) {
+ if (results.at(i))
+ tags.append(dataTag + " <=> " + dataTags[i]);
+ }
+}
+
+
+QString TestGenerator::generateTest()
+{
+ // All data tags keept in one place.
+ QVector<QString> dataTags;
+
+ // Data tags for values that return true in isXXX call
+ QList<QString> isValidList;
+ QList<QString> isBoolList;
+ QList<QString> isBooleanList;
+ QList<QString> isNumberList;
+ QList<QString> isFunctionList;
+ QList<QString> isNullList;
+ QList<QString> isStringList;
+ QList<QString> isUndefinedList;
+ QList<QString> isVariantList;
+ QList<QString> isQObjectList;
+ QList<QString> isQMetaObjectList;
+ QList<QString> isObjectList;
+ QList<QString> isDateList;
+ QList<QString> isRegExpList;
+ QList<QString> isArrayList;
+ QList<QString> isErrorList;
+
+ // List of pairs data tag and value returned from toXXX call
+ QList<QPair<QString, QString> > toStringList;
+ QList<QPair<QString, qsreal> > toNumberList;
+ QList<QPair<QString, bool> > toBoolList;
+ QList<QPair<QString, bool> > toBooleanList;
+ QList<QPair<QString, qsreal> > toIntegerList;
+ QList<QPair<QString, qint32> > toInt32List;
+ QList<QPair<QString, quint32> > toUInt32List;
+ QList<QPair<QString, quint16> > toUInt16List;
+
+ // List of complex tags returning true
+ QList<QString> equalsList;
+ QList<QString> strictlyEqualsList;
+ QList<QString> lessThanList;
+ QList<QString> instanceOfList;
+
+ QList<QPair<QString, QString> > castStringList;
+ QList<QPair<QString, qsreal> > castSRealList;
+ QList<QPair<QString, bool> > castBoolList;
+ QList<QPair<QString, qint32> > castInt32List;
+ QList<QPair<QString, quint32> > castUInt32List;
+ QList<QPair<QString, quint16> > castUInt16List;
+
+ // Load.
+ m_tempFile.seek(0);
+ QDataStream in(&m_tempFile);
+ in >> dataTags;
+ Q_ASSERT(in.status() == in.Ok);
+
+ while(!in.atEnd())
+ {
+ bool isValidRes;
+ bool isBoolRes;
+ bool isBooleanRes;
+ bool isNumberRes;
+ bool isFunctionRes;
+ bool isNullRes;
+ bool isStringRes;
+ bool isUndefinedRes;
+ bool isVariantRes;
+ bool isQObjectRes;
+ bool isQMetaObjectRes;
+ bool isObjectRes;
+ bool isDateRes;
+ bool isRegExpRes;
+ bool isArrayRes;
+ bool isErrorRes;
+
+ QString toStringRes;
+ qsreal toNumberRes;
+ bool toBoolRes;
+ bool toBooleanRes;
+ qsreal toIntegerRes;
+ qint32 toInt32Res;
+ quint32 toUInt32Res;
+ quint16 toUInt16Res;
+ //toVariantRes;
+ //toDateTimeRes;
+
+ QVector<bool> equalsRes;
+ QVector<bool> strictlyEqualsRes;
+ QVector<bool> lessThanRes;
+ QVector<bool> instanceOfRes;
+
+ QString castStringRes;
+ qsreal castSRealRes;
+ bool castBoolRes;
+ qint32 castInt32Res;
+ quint32 castUInt32Res;
+ quint16 castUInt16Res;
+
+ QString dataTag;
+ in >> dataTag;
+ in >> isValidRes;
+ in >> isBoolRes;
+ in >> isBooleanRes;
+ in >> isNumberRes;
+ in >> isFunctionRes;
+ in >> isNullRes;
+ in >> isStringRes;
+ in >> isUndefinedRes;
+ in >> isVariantRes;
+ in >> isQObjectRes;
+ in >> isQMetaObjectRes;
+ in >> isObjectRes;
+ in >> isDateRes;
+ in >> isRegExpRes;
+ in >> isArrayRes;
+ in >> isErrorRes;
+
+ if (isValidRes) isValidList.append(dataTag);
+ if (isBoolRes) isBoolList.append(dataTag);
+ if (isBooleanRes) isBooleanList.append(dataTag);
+ if (isNumberRes) isNumberList.append(dataTag);
+ if (isFunctionRes) isFunctionList.append(dataTag);
+ if (isNullRes) isNullList.append(dataTag);
+ if (isStringRes) isStringList.append(dataTag);
+ if (isUndefinedRes) isUndefinedList.append(dataTag);
+ if (isVariantRes) isVariantList.append(dataTag);
+ if (isQObjectRes) isQObjectList.append(dataTag);
+ if (isQMetaObjectRes) isQMetaObjectList.append(dataTag);
+ if (isObjectRes) isObjectList.append(dataTag);
+ if (isDateRes) isDateList.append(dataTag);
+ if (isRegExpRes) isRegExpList.append(dataTag);
+ if (isArrayRes) isArrayList.append(dataTag);
+ if (isErrorRes) isErrorList.append(dataTag);
+
+ in >> toStringRes;
+ in >> toNumberRes;
+ in >> toBoolRes;
+ in >> toBooleanRes;
+ in >> toIntegerRes;
+ in >> toInt32Res;
+ in >> toUInt32Res;
+ in >> toUInt16Res;
+ //in >> toVariantRes;
+ //in >> toDateTimeRes;
+
+ toStringList.append(QPair<QString, QString>(dataTag, toStringRes));
+ toNumberList.append(QPair<QString, qsreal>(dataTag, toNumberRes));
+ toBoolList.append(QPair<QString, bool>(dataTag, toBoolRes));
+ toBooleanList.append(QPair<QString, bool>(dataTag, toBooleanRes));
+ toIntegerList.append(QPair<QString, qsreal>(dataTag, toIntegerRes));
+ toInt32List.append(QPair<QString, qint32>(dataTag, toInt32Res));
+ toUInt32List.append(QPair<QString, quint32>(dataTag, toUInt32Res));
+ toUInt16List.append(QPair<QString, quint16>(dataTag, toUInt16Res));
+
+ in >> equalsRes;
+ in >> strictlyEqualsRes;
+ in >> lessThanRes;
+ in >> instanceOfRes;
+
+ squashTags(dataTag, equalsRes, equalsList, dataTags);
+ squashTags(dataTag, strictlyEqualsRes, strictlyEqualsList, dataTags);
+ squashTags(dataTag, lessThanRes, lessThanList, dataTags);
+ squashTags(dataTag, instanceOfRes, instanceOfList, dataTags);
+
+ in >> castStringRes;
+ in >> castSRealRes;
+ in >> castBoolRes;
+ in >> castInt32Res;
+ in >> castUInt32Res;
+ in >> castUInt16Res;
+
+ castStringList.append(QPair<QString, QString>(dataTag, castStringRes));
+ castSRealList.append(QPair<QString, qsreal>(dataTag, castSRealRes));
+ castBoolList.append(QPair<QString, bool>(dataTag, castBoolRes));
+ castInt32List.append(QPair<QString, qint32>(dataTag, castInt32Res));
+ castUInt32List.append(QPair<QString, quint32>(dataTag, castUInt32Res));
+ castUInt16List.append(QPair<QString, quint16>(dataTag, castUInt16Res));
+
+ Q_ASSERT(in.status() == in.Ok);
+ }
+
+ 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");
+}
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h
new file mode 100644
index 0000000..8f4a357
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef TESTGENERATOR_H
+#define TESTGENERATOR_H
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qtemporaryfile.h>
+
+class TestGenerator {
+public:
+ TestGenerator(QString& outputpath)
+ : m_ofile(outputpath)
+ {
+ // Open output file
+ if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ qWarning() << "Can't open output file: " << outputpath;
+ exit(2);
+ }
+ m_tempFile.open();
+ }
+
+ void run()
+ {
+ prepareData();
+ Q_ASSERT(m_tempFile.size());
+ save(generateTest());
+ }
+
+ void prepareData();
+ QString generateTest();
+ void save(const QString& data);
+private:
+ QFile m_ofile;
+ QTemporaryFile m_tempFile;
+};
+
+#endif // TESTGENERATOR_H
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 2aeabf0..f83cf58 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -39,14 +39,8 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
+#include "tst_qscriptvalue.h"
#include <QtGui/QPushButton>
-#include <QtCore/qnumeric.h>
-
-#include <QtScript/qscriptclass.h>
-#include <QtScript/qscriptvalue.h>
-#include <QtScript/qscriptengine.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -55,62 +49,70 @@ QT_BEGIN_NAMESPACE
extern bool qt_script_isJITEnabled();
QT_END_NAMESPACE
-class tst_QScriptValue : public QObject
+tst_QScriptValue::tst_QScriptValue()
+ : engine(0)
{
- Q_OBJECT
+}
-public:
- tst_QScriptValue();
- virtual ~tst_QScriptValue();
-
-private slots:
- void ctor();
- void engine();
- void toString();
- void toNumber();
- void toBoolean();
- void toBool();
- void toInteger();
- void toInt32();
- void toUInt32();
- void toUInt16();
- void toVariant();
- void toQObject();
- void toObject();
- void toDateTime();
- void toRegExp();
- void instanceOf();
- void isArray();
- void isDate();
- void isError();
- void isRegExp();
- void getSetPrototype();
- void getSetScope();
- void getSetProperty();
- void arrayElementGetterSetter();
- void getSetData();
- void getSetScriptClass();
- void call();
- void construct();
- void lessThan();
- void equals();
- void strictlyEquals();
- void castToPointer();
- void prettyPrinter_data();
- void prettyPrinter();
- void engineDeleted();
- void valueOfWithClosure();
- void objectId();
-};
+tst_QScriptValue::~tst_QScriptValue()
+{
+ delete engine;
+}
-tst_QScriptValue::tst_QScriptValue()
+void tst_QScriptValue::dataHelper(InitDataFunction init, DefineDataFunction define)
{
+ QTest::addColumn<QString>("__expression__");
+ (this->*init)();
+ QHash<QString,QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ m_currentExpression = it.key();
+ (this->*define)(it.key().toLatin1());
+ }
+ m_currentExpression = QString();
}
-tst_QScriptValue::~tst_QScriptValue()
+QTestData &tst_QScriptValue::newRow(const char *tag)
{
+ return QTest::newRow(tag) << m_currentExpression;
}
+void tst_QScriptValue::testHelper(TestFunction fun)
+{
+ QFETCH(QString, __expression__);
+ QScriptValue value = m_values.value(__expression__);
+ (this->*fun)(__expression__.toLatin1(), value);
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_initData()
+{
+ QTest::addColumn<int>("dummy");
+ initScriptValues();
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_makeData(const char *expr)
+{
+ newRow(expr) << 0;
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_test(const char *, const QScriptValue &value)
+{
+ QScriptValue copy(value);
+ QCOMPARE(copy.strictlyEquals(value), !value.isNumber() || !qIsNaN(value.toNumber()));
+ QCOMPARE(copy.engine(), value.engine());
+
+ QScriptValue assigned = copy;
+ QCOMPARE(assigned.strictlyEquals(value), !copy.isNumber() || !qIsNaN(copy.toNumber()));
+ QCOMPARE(assigned.engine(), assigned.engine());
+
+ QScriptValue other(!value.toBool());
+ assigned = other;
+ QVERIFY(!assigned.strictlyEquals(copy));
+ QVERIFY(assigned.strictlyEquals(other));
+ QCOMPARE(assigned.engine(), other.engine());
+}
+
+DEFINE_TEST_FUNCTION(assignAndCopyConstruct)
+
void tst_QScriptValue::ctor()
{
QScriptEngine eng;
@@ -330,19 +332,12 @@ void tst_QScriptValue::ctor()
QVERIFY(QScriptValue(0, QString("ciao")).isString());
}
-void tst_QScriptValue::engine()
-{
- QScriptEngine eng;
- QScriptValue object = eng.newObject();
- QCOMPARE(object.engine(), &eng);
-}
-
static QScriptValue myFunction(QScriptContext *, QScriptEngine *eng)
{
return eng->undefinedValue();
}
-void tst_QScriptValue::toString()
+void tst_QScriptValue::toString_old()
{
QScriptEngine eng;
@@ -456,7 +451,7 @@ void tst_QScriptValue::toString()
QVERIFY(variant.toString().isEmpty());
}
-void tst_QScriptValue::toNumber()
+void tst_QScriptValue::toNumber_old()
{
QScriptEngine eng;
@@ -529,7 +524,7 @@ void tst_QScriptValue::toNumber()
}
}
-void tst_QScriptValue::toBoolean() // deprecated
+void tst_QScriptValue::toBoolean_old() // deprecated
{
QScriptEngine eng;
@@ -626,7 +621,7 @@ void tst_QScriptValue::toBoolean() // deprecated
}
}
-void tst_QScriptValue::toBool()
+void tst_QScriptValue::toBool_old()
{
QScriptEngine eng;
@@ -723,7 +718,7 @@ void tst_QScriptValue::toBool()
}
}
-void tst_QScriptValue::toInteger()
+void tst_QScriptValue::toInteger_old()
{
QScriptEngine eng;
@@ -810,7 +805,7 @@ void tst_QScriptValue::toInteger()
QCOMPARE(inv.toInteger(), 0.0);
}
-void tst_QScriptValue::toInt32()
+void tst_QScriptValue::toInt32_old()
{
QScriptEngine eng;
@@ -946,7 +941,7 @@ void tst_QScriptValue::toInt32()
QCOMPARE(qscriptvalue_cast<qint32>(inv), 0);
}
-void tst_QScriptValue::toUInt32()
+void tst_QScriptValue::toUInt32_old()
{
QScriptEngine eng;
@@ -1078,7 +1073,7 @@ void tst_QScriptValue::toUInt32()
QCOMPARE(qscriptvalue_cast<quint32>(inv), quint32(0));
}
-void tst_QScriptValue::toUInt16()
+void tst_QScriptValue::toUInt16_old()
{
QScriptEngine eng;
@@ -1239,7 +1234,7 @@ void tst_QScriptValue::toUInt16()
Q_DECLARE_METATYPE(QVariant)
#endif
-void tst_QScriptValue::toVariant()
+void tst_QScriptValue::toVariant_old()
{
QScriptEngine eng;
@@ -1346,7 +1341,7 @@ void tst_QScriptValue::toVariant()
// unfortunately, this is necessary in order to do qscriptvalue_cast<QPushButton*>(...)
Q_DECLARE_METATYPE(QPushButton*)
-void tst_QScriptValue::toQObject()
+void tst_QScriptValue::toQObject_old()
{
QScriptEngine eng;
@@ -1541,7 +1536,7 @@ void tst_QScriptValue::toObject()
}
}
-void tst_QScriptValue::toDateTime()
+void tst_QScriptValue::toDateTime_old()
{
QScriptEngine eng;
QDateTime dt = eng.evaluate("new Date(0)").toDateTime();
@@ -1559,7 +1554,7 @@ void tst_QScriptValue::toDateTime()
QVERIFY(!eng.undefinedValue().toDateTime().isValid());
}
-void tst_QScriptValue::toRegExp()
+void tst_QScriptValue::toRegExp_old()
{
QScriptEngine eng;
{
@@ -1589,7 +1584,7 @@ void tst_QScriptValue::toRegExp()
QVERIFY(eng.undefinedValue().toRegExp().isEmpty());
}
-void tst_QScriptValue::instanceOf()
+void tst_QScriptValue::instanceOf_old()
{
QScriptEngine eng;
QScriptValue obj = eng.newObject();
@@ -1625,7 +1620,7 @@ void tst_QScriptValue::instanceOf()
QCOMPARE(obj.instanceOf(otherEngine.globalObject().property("Object")), false);
}
-void tst_QScriptValue::isArray()
+void tst_QScriptValue::isArray_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("[]").isArray());
@@ -1638,7 +1633,7 @@ void tst_QScriptValue::isArray()
QVERIFY(!eng.undefinedValue().isArray());
}
-void tst_QScriptValue::isDate()
+void tst_QScriptValue::isDate_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("new Date()").isDate());
@@ -1652,7 +1647,7 @@ void tst_QScriptValue::isDate()
QVERIFY(!eng.undefinedValue().isDate());
}
-void tst_QScriptValue::isError()
+void tst_QScriptValue::isError_old()
{
QStringList errors;
errors << "Error"
@@ -1677,7 +1672,7 @@ void tst_QScriptValue::isError()
QVERIFY(!eng.evaluate("new Object()").isError());
}
-void tst_QScriptValue::isRegExp()
+void tst_QScriptValue::isRegExp_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("/foo/").isRegExp());
@@ -2718,7 +2713,7 @@ void tst_QScriptValue::construct()
QVERIFY(!QScriptValue(QScriptValue::NullValue).construct().isValid());
}
-void tst_QScriptValue::lessThan()
+void tst_QScriptValue::lessThan_old()
{
QScriptEngine eng;
@@ -2812,7 +2807,7 @@ void tst_QScriptValue::lessThan()
QCOMPARE(date1.lessThan(QScriptValue(&otherEngine, 123)), false);
}
-void tst_QScriptValue::equals()
+void tst_QScriptValue::equals_old()
{
QScriptEngine eng;
@@ -2907,7 +2902,7 @@ void tst_QScriptValue::equals()
QScriptValue qobj1 = eng.newQObject(this);
QScriptValue qobj2 = eng.newQObject(this);
QScriptValue qobj3 = eng.newQObject(0);
- QScriptValue qobj4 = eng.newQObject(new QObject());
+ QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership);
QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers
QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers
QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers
@@ -3005,7 +3000,7 @@ void tst_QScriptValue::equals()
QCOMPARE(date1.equals(QScriptValue(&otherEngine, 123)), false);
}
-void tst_QScriptValue::strictlyEquals()
+void tst_QScriptValue::strictlyEquals_old()
{
QScriptEngine eng;
@@ -3456,4 +3451,3 @@ void tst_QScriptValue::objectId()
}
QTEST_MAIN(tst_QScriptValue)
-#include "tst_qscriptvalue.moc"
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h
new file mode 100644
index 0000000..6215506
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h
@@ -0,0 +1,410 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef TST_QSCRIPTVALUE_H
+#define TST_QSCRIPTVALUE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qnumeric.h>
+#include <QtScript/qscriptclass.h>
+#include <QtScript/qscriptengine.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtTest/QtTest>
+
+Q_DECLARE_METATYPE(QVariant)
+Q_DECLARE_METATYPE(QScriptValue)
+
+class tst_QScriptValue : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QScriptValue();
+ virtual ~tst_QScriptValue();
+
+private slots:
+ // Generated test functions
+ void isArray_data();
+ void isArray();
+
+ void isBool_data();
+ void isBool();
+
+ void isBoolean_data();
+ void isBoolean();
+
+ void isDate_data();
+ void isDate();
+
+ void isError_data();
+ void isError();
+
+ void isFunction_data();
+ void isFunction();
+
+ void isNull_data();
+ void isNull();
+
+ void isNumber_data();
+ void isNumber();
+
+ void isObject_data();
+ void isObject();
+
+// void isQMetaObject_data();
+// void isQMetaObject();
+
+// void isQObject_data();
+// void isQObject();
+
+ void isRegExp_data();
+ void isRegExp();
+
+ void isString_data();
+ void isString();
+
+ void isUndefined_data();
+ void isUndefined();
+
+ void isValid_data();
+ void isValid();
+
+// void isVariant_data();
+// void isVariant();
+
+ void toBool_data();
+ void toBool();
+
+ void toBoolean_data();
+ void toBoolean();
+
+// void toDateTime_data();
+// void toDateTime();
+
+ void toInt32_data();
+ void toInt32();
+
+ void toInteger_data();
+ void toInteger();
+
+ void toNumber_data();
+ void toNumber();
+
+// void toQMetaObject_data();
+// void toQMetaObject();
+
+// void toQObject_data();
+// void toQObject();
+
+// void toRegExp_data();
+// void toRegExp();
+
+ void toString_data();
+ void toString();
+
+ void toUInt16_data();
+ void toUInt16();
+
+ void toUInt32_data();
+ void toUInt32();
+
+// void toVariant_data();
+// void toVariant();
+
+ void equals_data();
+ void equals();
+
+ void strictlyEquals_data();
+ void strictlyEquals();
+
+ void lessThan_data();
+ void lessThan();
+
+ void instanceOf_data();
+ void instanceOf();
+
+ void assignAndCopyConstruct_data();
+ void assignAndCopyConstruct();
+
+ void qscriptvalue_castQString_data();
+ void qscriptvalue_castQString();
+
+ void qscriptvalue_castqsreal_data();
+ void qscriptvalue_castqsreal();
+
+ void qscriptvalue_castbool_data();
+ void qscriptvalue_castbool();
+
+ void qscriptvalue_castqint32_data();
+ void qscriptvalue_castqint32();
+
+ void qscriptvalue_castquint32_data();
+ void qscriptvalue_castquint32();
+
+ void qscriptvalue_castquint16_data();
+ void qscriptvalue_castquint16();
+
+ // Non-generated test functions
+
+ void toObject();
+ void ctor();
+
+ void toString_old();
+ void toNumber_old();
+ void toBoolean_old();
+ void toBool_old();
+ void toInteger_old();
+ void toInt32_old();
+ void toUInt32_old();
+ void toUInt16_old();
+ void toVariant_old();
+ void toQObject_old();
+ void toDateTime_old();
+ void toRegExp_old();
+ void instanceOf_old();
+ void isArray_old();
+ void isDate_old();
+ void isError_old();
+ void isRegExp_old();
+
+ void lessThan_old();
+ void equals_old();
+ void strictlyEquals_old();
+
+ void getSetPrototype();
+ void getSetScope();
+ void getSetProperty();
+ void arrayElementGetterSetter();
+ void getSetData();
+ void getSetScriptClass();
+ void call();
+ void construct();
+ void castToPointer();
+ void prettyPrinter_data();
+ void prettyPrinter();
+ void engineDeleted();
+ void valueOfWithClosure();
+ void objectId();
+
+private:
+ typedef void (tst_QScriptValue::*InitDataFunction)();
+ typedef void (tst_QScriptValue::*DefineDataFunction)(const char *);
+ void dataHelper(InitDataFunction init, DefineDataFunction define);
+ QTestData &newRow(const char *tag);
+
+ typedef void (tst_QScriptValue::*TestFunction)(const char *, const QScriptValue &);
+ void testHelper(TestFunction fun);
+
+ // Generated functions
+
+ void initScriptValues();
+
+ void isArray_initData();
+ void isArray_makeData(const char *expr);
+ void isArray_test(const char *expr, const QScriptValue &value);
+
+ void isBool_initData();
+ void isBool_makeData(const char *expr);
+ void isBool_test(const char *expr, const QScriptValue &value);
+
+ void isBoolean_initData();
+ void isBoolean_makeData(const char *expr);
+ void isBoolean_test(const char *expr, const QScriptValue &value);
+
+ void isDate_initData();
+ void isDate_makeData(const char *expr);
+ void isDate_test(const char *expr, const QScriptValue &value);
+
+ void isError_initData();
+ void isError_makeData(const char *expr);
+ void isError_test(const char *expr, const QScriptValue &value);
+
+ void isFunction_initData();
+ void isFunction_makeData(const char *expr);
+ void isFunction_test(const char *expr, const QScriptValue &value);
+
+ void isNull_initData();
+ void isNull_makeData(const char *expr);
+ void isNull_test(const char *expr, const QScriptValue &value);
+
+ void isNumber_initData();
+ void isNumber_makeData(const char *expr);
+ void isNumber_test(const char *expr, const QScriptValue &value);
+
+ void isObject_initData();
+ void isObject_makeData(const char *expr);
+ void isObject_test(const char *expr, const QScriptValue &value);
+
+ void isQMetaObject_initData();
+ void isQMetaObject_makeData(const char *expr);
+ void isQMetaObject_test(const char *expr, const QScriptValue &value);
+
+ void isQObject_initData();
+ void isQObject_makeData(const char *expr);
+ void isQObject_test(const char *expr, const QScriptValue &value);
+
+ void isRegExp_initData();
+ void isRegExp_makeData(const char *expr);
+ void isRegExp_test(const char *expr, const QScriptValue &value);
+
+ void isString_initData();
+ void isString_makeData(const char *expr);
+ void isString_test(const char *expr, const QScriptValue &value);
+
+ void isUndefined_initData();
+ void isUndefined_makeData(const char *expr);
+ void isUndefined_test(const char *expr, const QScriptValue &value);
+
+ void isValid_initData();
+ void isValid_makeData(const char *expr);
+ void isValid_test(const char *expr, const QScriptValue &value);
+
+ void isVariant_initData();
+ void isVariant_makeData(const char *expr);
+ void isVariant_test(const char *expr, const QScriptValue &value);
+
+ void toBool_initData();
+ void toBool_makeData(const char *);
+ void toBool_test(const char *, const QScriptValue &value);
+
+ void toBoolean_initData();
+ void toBoolean_makeData(const char *);
+ void toBoolean_test(const char *, const QScriptValue &value);
+
+ void toDateTime_initData();
+ void toDateTime_makeData(const char *);
+ void toDateTime_test(const char *, const QScriptValue &value);
+
+ void toInt32_initData();
+ void toInt32_makeData(const char *);
+ void toInt32_test(const char *, const QScriptValue &value);
+
+ void toInteger_initData();
+ void toInteger_makeData(const char *);
+ void toInteger_test(const char *, const QScriptValue &value);
+
+ void toNumber_initData();
+ void toNumber_makeData(const char *);
+ void toNumber_test(const char *, const QScriptValue &value);
+
+ void toQMetaObject_initData();
+ void toQMetaObject_makeData(const char *);
+ void toQMetaObject_test(const char *, const QScriptValue &value);
+
+ void toQObject_initData();
+ void toQObject_makeData(const char *);
+ void toQObject_test(const char *, const QScriptValue &value);
+
+ void toRegExp_initData();
+ void toRegExp_makeData(const char *);
+ void toRegExp_test(const char *, const QScriptValue &value);
+
+ void toString_initData();
+ void toString_makeData(const char *);
+ void toString_test(const char *, const QScriptValue &value);
+
+ void toUInt16_initData();
+ void toUInt16_makeData(const char *);
+ void toUInt16_test(const char *, const QScriptValue &value);
+
+ void toUInt32_initData();
+ void toUInt32_makeData(const char *);
+ void toUInt32_test(const char *, const QScriptValue &value);
+
+ void toVariant_initData();
+ void toVariant_makeData(const char *);
+ void toVariant_test(const char *, const QScriptValue &value);
+
+ void equals_initData();
+ void equals_makeData(const char *);
+ void equals_test(const char *, const QScriptValue &value);
+
+ void strictlyEquals_initData();
+ void strictlyEquals_makeData(const char *);
+ void strictlyEquals_test(const char *, const QScriptValue &value);
+
+ void lessThan_initData();
+ void lessThan_makeData(const char *);
+ void lessThan_test(const char *, const QScriptValue &value);
+
+ void instanceOf_initData();
+ void instanceOf_makeData(const char *);
+ void instanceOf_test(const char *, const QScriptValue &value);
+
+ void assignAndCopyConstruct_initData();
+ void assignAndCopyConstruct_makeData(const char *);
+ void assignAndCopyConstruct_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castQString_initData();
+ void qscriptvalue_castQString_makeData(const char *);
+ void qscriptvalue_castQString_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castqsreal_initData();
+ void qscriptvalue_castqsreal_makeData(const char *);
+ void qscriptvalue_castqsreal_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castbool_initData();
+ void qscriptvalue_castbool_makeData(const char *);
+ void qscriptvalue_castbool_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castqint32_initData();
+ void qscriptvalue_castqint32_makeData(const char *);
+ void qscriptvalue_castqint32_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castquint32_initData();
+ void qscriptvalue_castquint32_makeData(const char *);
+ void qscriptvalue_castquint32_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castquint16_initData();
+ void qscriptvalue_castquint16_makeData(const char *);
+ void qscriptvalue_castquint16_test(const char *, const QScriptValue &value);
+
+private:
+ QScriptEngine *engine;
+ QHash<QString, QScriptValue> m_values;
+ QString m_currentExpression;
+};
+
+#define DEFINE_TEST_FUNCTION(name) \
+void tst_QScriptValue::name##_data() { dataHelper(&tst_QScriptValue::name##_initData, &tst_QScriptValue::name##_makeData); } \
+void tst_QScriptValue::name() { testHelper(&tst_QScriptValue::name##_test); }
+
+#endif
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
new file mode 100644
index 0000000..1d105b4
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
@@ -0,0 +1,6369 @@
+/****************************************************************************
+**
+** 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()"));
+}
+
+
+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()\")"
+ ;
+ }
+ newRow(expr) << isValid.contains(expr);
+}
+
+void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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)"
+ ;
+ }
+ newRow(expr) << isBool.contains(expr);
+}
+
+void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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)"
+ ;
+ }
+ newRow(expr) << isBoolean.contains(expr);
+}
+
+void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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())"
+ ;
+ }
+ newRow(expr) << isNumber.contains(expr);
+}
+
+void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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/\")"
+ ;
+ }
+ newRow(expr) << isFunction.contains(expr);
+}
+
+void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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)"
+ ;
+ }
+ newRow(expr) << isNull.contains(expr);
+}
+
+void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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\"))"
+ ;
+ }
+ newRow(expr) << isString.contains(expr);
+}
+
+void tst_QScriptValue::isString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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(\"{}\")"
+ ;
+ }
+ newRow(expr) << isUndefined.contains(expr);
+}
+
+void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isUndefined(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isUndefined)
+
+
+
+
+
+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()\")"
+ ;
+ }
+ newRow(expr) << isObject.contains(expr);
+}
+
+void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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\")"
+ ;
+ }
+ newRow(expr) << isDate.contains(expr);
+}
+
+void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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);
+}
+
+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()\")"
+ ;
+ }
+ newRow(expr) << isArray.contains(expr);
+}
+
+void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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()\")"
+ ;
+ }
+ newRow(expr) << isError.contains(expr);
+}
+
+void tst_QScriptValue::isError_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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");
+ }
+ newRow(expr) << toString.value(expr);
+}
+
+void tst_QScriptValue::toString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(QString, 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());
+ }
+ 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()));
+ return;
+ }
+ 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);
+ }
+ newRow(expr) << toBool.value(expr);
+}
+
+void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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);
+ }
+ newRow(expr) << toBoolean.value(expr);
+}
+
+void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, 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);
+ }
+ 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()));
+ return;
+ }
+ 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);
+ }
+ newRow(expr) << toInt32.value(expr);
+}
+
+void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qint32, 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);
+ }
+ newRow(expr) << toUInt32.value(expr);
+}
+
+void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint32, 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);
+ }
+ newRow(expr) << toUInt16.value(expr);
+}
+
+void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint16, 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::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(true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, 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(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(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(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.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(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(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) <=> 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(0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 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()) <=> 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(\"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\") <=> 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(\"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(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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"12.4\")) <=> QScriptValue(QString(\"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::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, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 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, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 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()) <=> 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, \"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\") <=> 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, \"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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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::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, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 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, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 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()) <=> 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, \"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\") <=> 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, \"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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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(\"{}\") <=> 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(\"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(\"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 Error()\") <=> engine->evaluate(\"new Error()\")");
+ }
+ 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::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(true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 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(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(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.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(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(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) <=> 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(0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())");
+ 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(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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"12.4\")) <=> QScriptValue(QString(\"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::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, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 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, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())");
+ 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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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::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, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 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, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())");
+ 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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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(\"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()\")");
+ }
+ 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(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(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(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(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(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.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(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(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) <=> 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(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(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(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(-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(\"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(\"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\") <=> 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(\"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()) <=> 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(\"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(\"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(\"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(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, 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, 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, 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, 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, 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.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, 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, 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) <=> 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, 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, 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, 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, -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, \"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, \"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\") <=> 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, \"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()) <=> 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(\"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(\"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(\"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(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, 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, 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, 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, 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, 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.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, 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, 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) <=> 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, 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, 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, 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, -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, \"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, \"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\") <=> 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, \"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()) <=> 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(\"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(\"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(\"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("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(\"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(\"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(\"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(\"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(\"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 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 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()\")");
+ }
+ 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\")");
+ }
+ 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");
+ }
+ 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);
+}
+
+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());
+ }
+ 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)));
+ return;
+ }
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value)));
+ return;
+ }
+ 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);
+ }
+ 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);
+}
+
+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);
+ }
+ 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);
+}
+
+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);
+ }
+ 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);
+}
+
+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);
+ }
+ 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);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castquint16)
diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
index 39267c8..3f49ccc 100644
--- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
+++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
contains(QT_CONFIG,xmlpatterns) {
SUBDIRS += lib
- !wince*:lib.file = lib/lib.pro
test.depends = lib
}
SUBDIRS += test
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 1c78f1f..7a27cc9 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -5,6 +5,7 @@ SUBDIRS = containers-associative \
qbytearray \
qfileinfo \
qfile_vs_qnetworkaccessmanager \
+ qfontmetrics \
qhostinfo \
qpainter \
qtestlib-simple events \
diff --git a/tests/benchmarks/qfontmetrics/main.cpp b/tests/benchmarks/qfontmetrics/main.cpp
new file mode 100644
index 0000000..d3f85ef
--- /dev/null
+++ b/tests/benchmarks/qfontmetrics/main.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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 <QObject>
+#include <QFont>
+#include <QFontMetrics>
+
+#include <qtest.h>
+
+//this test benchmarks the once-off (per font configuration) cost
+//associated with using QFontMetrics
+class tst_QFontMetrics : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QFontMetrics() {}
+private slots:
+ void fontmetrics_create();
+ void fontmetrics_create_once_loaded();
+
+ void fontmetrics_height();
+ void fontmetrics_height_once_loaded();
+
+private:
+ void testQFontMetrics(const QFontMetrics &fm);
+};
+
+void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm )
+{
+ int fontHeight = fm.height();
+}
+
+void tst_QFontMetrics::fontmetrics_create()
+{
+ QBENCHMARK {
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ }
+}
+
+void tst_QFontMetrics::fontmetrics_create_once_loaded()
+{
+ QBENCHMARK {
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ }
+}
+
+void tst_QFontMetrics::fontmetrics_height()
+{
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+
+ QBENCHMARK { testQFontMetrics(bfm); }
+}
+
+void tst_QFontMetrics::fontmetrics_height_once_loaded()
+{
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ QBENCHMARK { testQFontMetrics(bfm); }
+}
+
+QTEST_MAIN(tst_QFontMetrics)
+
+#include "main.moc"
diff --git a/tests/benchmarks/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/qfontmetrics/qfontmetrics.pro
new file mode 100644
index 0000000..b6c7b92
--- /dev/null
+++ b/tests/benchmarks/qfontmetrics/qfontmetrics.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_QFontMetrics
+
+SOURCES += main.cpp
diff --git a/tests/benchmarks/qscriptengine/qscriptengine.pro b/tests/benchmarks/qscriptengine/qscriptengine.pro
index 22bbccd..df6dbb3 100644
--- a/tests/benchmarks/qscriptengine/qscriptengine.pro
+++ b/tests/benchmarks/qscriptengine/qscriptengine.pro
@@ -5,3 +5,8 @@ TARGET = tst_qscriptengine
SOURCES += tst_qscriptengine.cpp
QT += script
+
+symbian* {
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
+ TARGET.EPOCSTACKSIZE = 0x14000
+}
diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
index b42a355..6c6f0b1 100644
--- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
@@ -256,8 +256,13 @@ void tst_QScriptEngine::nativeCall()
QScriptEngine eng;
eng.globalObject().setProperty("fun", eng.newFunction(native_function));
QBENCHMARK{
+#if !defined(Q_OS_SYMBIAN)
eng.evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n"
" w += fun() + fun(); w -= fun(); fun(); w -= fun(); }");
+#else
+ eng.evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n"
+ " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }");
+#endif
}
}
diff --git a/tests/benchmarks/qstring/main.cpp b/tests/benchmarks/qstring/main.cpp
index 298c784..12826eb 100644
--- a/tests/benchmarks/qstring/main.cpp
+++ b/tests/benchmarks/qstring/main.cpp
@@ -42,6 +42,12 @@
#include <QFile>
#include <qtest.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
class tst_QString: public QObject
{
Q_OBJECT
diff --git a/tests/benchmarks/qstring/qstring.pro b/tests/benchmarks/qstring/qstring.pro
index 6aad1c0..2e7c86a 100644
--- a/tests/benchmarks/qstring/qstring.pro
+++ b/tests/benchmarks/qstring/qstring.pro
@@ -5,8 +5,12 @@ SOURCES += main.cpp
wince*:{
DEFINES += SRCDIR=\\\"\\\"
+} else:symbian* {
+ addFiles.sources = utf-8.txt
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+ TARGET.EPOCHEAPSIZE="0x100 0x1000000"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
-
diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp
index 9854a9f..d4f3165 100644
--- a/tests/benchmarks/qtext/main.cpp
+++ b/tests/benchmarks/qtext/main.cpp
@@ -51,6 +51,12 @@
#include <QBuffer>
#include <qtest.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
Q_DECLARE_METATYPE(QTextDocument*)
class tst_QText: public QObject
@@ -129,7 +135,11 @@ void tst_QText::shaping_data()
QTest::newRow("lorem") << m_lorem;
QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet");
+#if !defined(Q_OS_SYMBIAN)
QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt"));
+#else
+ QFile file( SRCDIR "bidi.txt" );
+#endif
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
QVERIFY(data.count() > 1000);
diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/qtext/qtext.pro
index ce4f604..9e8860f 100644
--- a/tests/benchmarks/qtext/qtext.pro
+++ b/tests/benchmarks/qtext/qtext.pro
@@ -4,4 +4,11 @@ TARGET = tst_QText
SOURCES += main.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+symbian* {
+ TARGET.CAPABILITY = ALL -TCB
+ addFiles.sources = bidi.txt
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+} \ No newline at end of file
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index b614cb4..f2bb816 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -122,17 +122,17 @@ private:
void retranslate()
{
- simpleSearchLabel->setText(tr("Search for:"));
- prevQueryButton->setToolTip(tr("Previous search"));
- nextQueryButton->setToolTip(tr("Next search"));
- searchButton->setText(tr("Search"));
+ simpleSearchLabel->setText(QHelpSearchQueryWidget::tr("Search for:"));
+ prevQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Previous search"));
+ nextQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Next search"));
+ searchButton->setText(QHelpSearchQueryWidget::tr("Search"));
#ifdef QT_CLUCENE_SUPPORT
- advancedSearchLabel->setText(tr("Advanced search"));
- similarLabel->setText(tr("words <B>similar</B> to:"));
- withoutLabel->setText(tr("<B>without</B> the words:"));
- exactLabel->setText(tr("with <B>exact phrase</B>:"));
- allLabel->setText(tr("with <B>all</B> of the words:"));
- atLeastLabel->setText(tr("with <B>at least one</B> of the words:"));
+ advancedSearchLabel->setText(QHelpSearchQueryWidget::tr("Advanced search"));
+ similarLabel->setText(QHelpSearchQueryWidget::tr("words <B>similar</B> to:"));
+ withoutLabel->setText(QHelpSearchQueryWidget::tr("<B>without</B> the words:"));
+ exactLabel->setText(QHelpSearchQueryWidget::tr("with <B>exact phrase</B>:"));
+ allLabel->setText(QHelpSearchQueryWidget::tr("with <B>all</B> of the words:"));
+ atLeastLabel->setText(QHelpSearchQueryWidget::tr("with <B>at least one</B> of the words:"));
#endif
}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 8342fbe..8d1b640 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -317,7 +317,6 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "OPENSSL" ] = "auto";
dictionary[ "DBUS" ] = "auto";
dictionary[ "S60" ] = "yes";
- dictionary[ "SYMBIAN_DEFFILES" ] = "yes";
dictionary[ "STYLE_WINDOWS" ] = "yes";
dictionary[ "STYLE_WINDOWSXP" ] = "auto";
@@ -1475,6 +1474,7 @@ void Configure::applySpecSpecifics()
dictionary[ "XMLPATTERNS" ] = "yes";
dictionary[ "QT_GLIB" ] = "no";
dictionary[ "S60" ] = "yes";
+ dictionary[ "SYMBIAN_DEFFILES" ] = "yes";
// iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested)
// iconv_open seems to return -1 always, so something is probably missing from the platform.
dictionary[ "QT_ICONV" ] = "no";
@@ -1482,7 +1482,7 @@ void Configure::applySpecSpecifics()
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ];
dictionary[ "QT_INSTALL_PREFIX" ] = "";
dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins";
- dictionary[ "ARM_FPU_TYPE" ] = "softvfp+vfpv2";
+ dictionary[ "ARM_FPU_TYPE" ] = "softvfp";
dictionary[ "SQL_SQLITE" ] = "yes";
dictionary[ "SQL_SQLITE_LIB" ] = "system";
@@ -2535,8 +2535,11 @@ void Configure::generateOutputVars()
qtConfig += "phonon-backend";
}
- if (dictionary["MULTIMEDIA"] == "yes")
+ if (dictionary["MULTIMEDIA"] == "yes") {
qtConfig += "multimedia";
+ if (dictionary["AUDIO_BACKEND"] == "yes")
+ qtConfig += "audio-backend";
+ }
if (dictionary["WEBKIT"] == "yes")
qtConfig += "webkit";
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index b005e42..b659179 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -1446,7 +1446,7 @@ void QDesignerResource::applyTabStops(QWidget *widget, DomTabStops *tabStops)
return;
QList<QWidget*> tabOrder;
- foreach (QString widgetName, tabStops->elementTabStop()) {
+ foreach (const QString &widgetName, tabStops->elementTabStop()) {
if (QWidget *w = qFindChild<QWidget*>(widget, widgetName)) {
tabOrder.append(w);
}
@@ -2418,7 +2418,7 @@ DomResources *QDesignerResource::saveResources(const QStringList &qrcPaths)
QList<DomResource*> dom_include;
if (resourceSet) {
const QStringList activePaths = resourceSet->activeQrcPaths();
- foreach (QString path, activePaths) {
+ foreach (const QString &path, activePaths) {
if (qrcPaths.contains(path)) {
DomResource *dom_res = new DomResource;
QString conv_path = path;
diff --git a/tools/designer/src/components/propertyeditor/designerpropertymanager.h b/tools/designer/src/components/propertyeditor/designerpropertymanager.h
index 0ec5241..11f900b 100644
--- a/tools/designer/src/components/propertyeditor/designerpropertymanager.h
+++ b/tools/designer/src/components/propertyeditor/designerpropertymanager.h
@@ -102,7 +102,7 @@ class DesignerPropertyManager : public QtVariantPropertyManager
{
Q_OBJECT
public:
- DesignerPropertyManager(QDesignerFormEditorInterface *core, QObject *parent = 0);
+ explicit DesignerPropertyManager(QDesignerFormEditorInterface *core, QObject *parent = 0);
~DesignerPropertyManager();
virtual QStringList attributes(int propertyType) const;
diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp
index fbaf461..887ba98 100644
--- a/tools/designer/src/designer/qdesigner_actions.cpp
+++ b/tools/designer/src/designer/qdesigner_actions.cpp
@@ -580,7 +580,7 @@ bool QDesignerActions::openForm(QWidget *parent)
return false;
bool atLeastOne = false;
- foreach (QString fileName, fileNames) {
+ foreach (const QString &fileName, fileNames) {
if (readInForm(fileName) && !atLeastOne)
atLeastOne = true;
}
@@ -869,7 +869,7 @@ bool QDesignerActions::writeOutForm(QDesignerFormWindowInterface *fw, const QStr
if (f.fileName() != fileName) {
removeBackup(backupFile);
fi.setFile(fileName);
- backupFile = QString();
+ backupFile.clear();
if (fi.exists())
backupFile = createBackup(fileName);
}
diff --git a/tools/designer/src/designer/qdesigner_server.cpp b/tools/designer/src/designer/qdesigner_server.cpp
index 8016dff..de1532c 100644
--- a/tools/designer/src/designer/qdesigner_server.cpp
+++ b/tools/designer/src/designer/qdesigner_server.cpp
@@ -83,7 +83,7 @@ void QDesignerServer::sendOpenRequest(int port, const QStringList &files)
sSocket->connectToHost(QHostAddress::LocalHost, port);
if(sSocket->waitForConnected(3000))
{
- foreach(QString file, files)
+ foreach(const QString &file, files)
{
QFileInfo fi(file);
sSocket->write(fi.absoluteFilePath().toUtf8() + '\n');
@@ -96,9 +96,8 @@ void QDesignerServer::sendOpenRequest(int port, const QStringList &files)
void QDesignerServer::readFromClient()
{
- QString file = QString();
while (m_socket->canReadLine()) {
- file = QString::fromUtf8(m_socket->readLine());
+ QString file = QString::fromUtf8(m_socket->readLine());
if (!file.isNull()) {
file.remove(QLatin1Char('\n'));
file.remove(QLatin1Char('\r'));
@@ -143,7 +142,6 @@ QDesignerClient::~QDesignerClient()
void QDesignerClient::readFromSocket()
{
- QString file = QString();
while (m_socket->canReadLine()) {
QString file = QString::fromUtf8(m_socket->readLine());
if (!file.isNull()) {
diff --git a/tools/designer/src/designer/qdesigner_server.h b/tools/designer/src/designer/qdesigner_server.h
index 08bce68..d522056 100644
--- a/tools/designer/src/designer/qdesigner_server.h
+++ b/tools/designer/src/designer/qdesigner_server.h
@@ -53,7 +53,7 @@ class QDesignerServer: public QObject
{
Q_OBJECT
public:
- QDesignerServer(QObject *parent = 0);
+ explicit QDesignerServer(QObject *parent = 0);
virtual ~QDesignerServer();
quint16 serverPort() const;
diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp
index 624b8bb..26ac8a8 100644
--- a/tools/designer/src/lib/shared/actioneditor.cpp
+++ b/tools/designer/src/lib/shared/actioneditor.cpp
@@ -428,7 +428,7 @@ void ActionEditor::unmanageAction(QAction *action)
m_actionView->model()->remove(row);
}
-// Set an intial property and mark it as changed in the sheet
+// Set an initial property and mark it as changed in the sheet
static void setInitialProperty(QDesignerPropertySheetExtension *sheet, const QString &name, const QVariant &value)
{
const int index = sheet->indexOf(name);
diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp
index 64cf9c4..e3ff2c1 100644
--- a/tools/designer/src/lib/shared/actionrepository.cpp
+++ b/tools/designer/src/lib/shared/actionrepository.cpp
@@ -244,7 +244,7 @@ QMimeData *ActionModel::mimeData(const QModelIndexList &indexes ) const
ActionRepositoryMimeData::ActionList actionList;
QSet<QAction*> actions;
- foreach (const QModelIndex &index, indexes)
+ foreach (const QModelIndex &index, indexes)
if (QStandardItem *item = itemFromIndex(index))
if (QAction *action = actionOfItem(item))
actions.insert(action);
diff --git a/tools/designer/src/lib/shared/connectionedit_p.h b/tools/designer/src/lib/shared/connectionedit_p.h
index 4f0148d..37dfe75 100644
--- a/tools/designer/src/lib/shared/connectionedit_p.h
+++ b/tools/designer/src/lib/shared/connectionedit_p.h
@@ -87,7 +87,7 @@ public:
class EndPoint {
public:
enum Type { Source, Target };
- EndPoint(Connection *_con = 0, Type _type = Source) : con(_con), type(_type) {}
+ explicit EndPoint(Connection *_con = 0, Type _type = Source) : con(_con), type(_type) {}
bool isNull() const { return con == 0; }
bool operator == (const EndPoint &other) const { return con == other.con && type == other.type; }
bool operator != (const EndPoint &other) const { return !operator == (other); }
diff --git a/tools/designer/src/lib/shared/filterwidget_p.h b/tools/designer/src/lib/shared/filterwidget_p.h
index fdb199d..025d708 100644
--- a/tools/designer/src/lib/shared/filterwidget_p.h
+++ b/tools/designer/src/lib/shared/filterwidget_p.h
@@ -66,7 +66,7 @@ class QPushButton;
namespace qdesigner_internal {
/* A line edit that displays a grayed hintText (like "Type Here to Filter")
- * when not focussed and empty. When connecting to the changed signals and
+ * when not focused and empty. When connecting to the changed signals and
* querying text, one has to be aware that the text is set to that hint
* text if isShowingHintText() returns true (that is, does not contain
* valid user input). This widget should never have initial focus
diff --git a/tools/designer/src/lib/shared/iconloader.cpp b/tools/designer/src/lib/shared/iconloader.cpp
index 2c97f62..df0bb7e 100644
--- a/tools/designer/src/lib/shared/iconloader.cpp
+++ b/tools/designer/src/lib/shared/iconloader.cpp
@@ -60,7 +60,7 @@ QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name)
#endif
<< (QString::fromUtf8(":/trolltech/formeditor/images/designer_") + name);
- foreach (QString f, candidates) {
+ foreach (const QString &f, candidates) {
if (QFile::exists(f))
return QIcon(f);
}
diff --git a/tools/designer/src/lib/shared/iconselector_p.h b/tools/designer/src/lib/shared/iconselector_p.h
index 63d4ad7..3373f80 100644
--- a/tools/designer/src/lib/shared/iconselector_p.h
+++ b/tools/designer/src/lib/shared/iconselector_p.h
@@ -76,7 +76,7 @@ class QDESIGNER_SHARED_EXPORT LanguageResourceDialog : public QDialog
{
Q_OBJECT
- LanguageResourceDialog(QDesignerResourceBrowserInterface *rb, QWidget *parent = 0);
+ explicit LanguageResourceDialog(QDesignerResourceBrowserInterface *rb, QWidget *parent = 0);
public:
virtual ~LanguageResourceDialog();
diff --git a/tools/designer/src/lib/shared/plugindialog.cpp b/tools/designer/src/lib/shared/plugindialog.cpp
index c79dcf2..3e88043 100644
--- a/tools/designer/src/lib/shared/plugindialog.cpp
+++ b/tools/designer/src/lib/shared/plugindialog.cpp
@@ -105,7 +105,7 @@ void PluginDialog::populateTreeWidget()
QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Loaded Plugins"));
QFont boldFont = topLevelItem->font(0);
- foreach (QString fileName, fileNames) {
+ foreach (const QString &fileName, fileNames) {
QPluginLoader loader(fileName);
const QFileInfo fileInfo(fileName);
@@ -127,7 +127,7 @@ void PluginDialog::populateTreeWidget()
if (!notLoadedPlugins.isEmpty()) {
QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Failed Plugins"));
const QFont boldFont = topLevelItem->font(0);
- foreach (const QString plugin, notLoadedPlugins) {
+ foreach (const QString &plugin, notLoadedPlugins) {
const QString failureReason = pluginManager->failureReason(plugin);
QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, plugin, boldFont);
setItem(pluginItem, failureReason, failureReason, QString(), QIcon());
diff --git a/tools/designer/src/lib/shared/qdesigner_introspection.cpp b/tools/designer/src/lib/shared/qdesigner_introspection.cpp
index 170a111..7bc60d4 100644
--- a/tools/designer/src/lib/shared/qdesigner_introspection.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_introspection.cpp
@@ -63,7 +63,7 @@ static QStringList byteArrayListToStringList(const QList<QByteArray> &l)
static inline QString charToQString(const char *c)
{
if (!c)
- return QString::null;
+ return QString();
return QString::fromUtf8(c);
}
diff --git a/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h b/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h
index 354ef2a..f4b6672 100644
--- a/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h
@@ -85,7 +85,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerObjectInspector: public QDesignerObjectIn
{
Q_OBJECT
public:
- QDesignerObjectInspector(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ explicit QDesignerObjectInspector(QWidget *parent = 0, Qt::WindowFlags flags = 0);
// Select a qobject unmanaged by form window
virtual bool selectObject(QObject *o) = 0;
diff --git a/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h b/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h
index d1e407d..1e63d81 100644
--- a/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h
@@ -80,9 +80,9 @@ namespace qdesigner_internal {
class NewPromotedClassPanel : public QGroupBox {
Q_OBJECT
public:
- NewPromotedClassPanel(const QStringList &baseClasses,
- int selectedBaseClass = -1,
- QWidget *parent = 0);
+ explicit NewPromotedClassPanel(const QStringList &baseClasses,
+ int selectedBaseClass = -1,
+ QWidget *parent = 0);
signals:
void newPromotedClass(const PromotionParameters &, bool *ok);
@@ -114,10 +114,10 @@ namespace qdesigner_internal {
public:
enum Mode { ModeEdit, ModeEditChooseClass };
- QDesignerPromotionDialog(QDesignerFormEditorInterface *core,
- QWidget *parent = 0,
- const QString &promotableWidgetClassName = QString(),
- QString *promoteTo = 0);
+ explicit QDesignerPromotionDialog(QDesignerFormEditorInterface *core,
+ QWidget *parent = 0,
+ const QString &promotableWidgetClassName = QString(),
+ QString *promoteTo = 0);
// Return an alphabetically ordered list of base class names for adding new classes.
static const QStringList &baseClassNames(const QDesignerPromotionInterface *promotion);
diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
index c618bd7..cdd53f0 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
@@ -69,7 +69,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerPropertyEditor: public QDesignerPropertyE
{
Q_OBJECT
public:
- QDesignerPropertyEditor(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ explicit QDesignerPropertyEditor(QWidget *parent = 0, Qt::WindowFlags flags = 0);
// A pair <ValidationMode, bool isTranslatable>.
typedef QPair<TextPropertyValidationMode, bool> StringPropertyParameters;
diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
index 1cee074..02a2f6d 100644
--- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
@@ -440,7 +440,7 @@ QAction *ToolBarEventFilter::actionAt(const QToolBar *tb, const QPoint &pos)
return tb->actions().at(index);
}
-//that's a trick to get acces to the initStyleOption which is a protected member
+//that's a trick to get access to the initStyleOption which is a protected member
class FriendlyToolBar : public QToolBar {
public:
friend class ToolBarEventFilter;
diff --git a/tools/designer/src/lib/shared/qdesigner_utils_p.h b/tools/designer/src/lib/shared/qdesigner_utils_p.h
index 502703d..fac0697 100644
--- a/tools/designer/src/lib/shared/qdesigner_utils_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_utils_p.h
@@ -298,7 +298,7 @@ class QDESIGNER_SHARED_EXPORT DesignerIconCache : public QObject
{
Q_OBJECT
public:
- DesignerIconCache(DesignerPixmapCache *pixmapCache, QObject *parent = 0);
+ explicit DesignerIconCache(DesignerPixmapCache *pixmapCache, QObject *parent = 0);
QIcon icon(const PropertySheetIconValue &value) const;
void clear();
signals:
@@ -313,7 +313,7 @@ private:
class QDESIGNER_SHARED_EXPORT PropertySheetStringValue
{
public:
- PropertySheetStringValue(const QString &value = QString(),
+ explicit PropertySheetStringValue(const QString &value = QString(),
bool translatable = true,
const QString &disambiguation = QString(),
const QString &comment = QString());
@@ -345,11 +345,11 @@ private:
class QDESIGNER_SHARED_EXPORT PropertySheetKeySequenceValue
{
public:
- PropertySheetKeySequenceValue(const QKeySequence &value = QKeySequence(),
+ explicit PropertySheetKeySequenceValue(const QKeySequence &value = QKeySequence(),
bool translatable = true,
const QString &disambiguation = QString(),
const QString &comment = QString());
- PropertySheetKeySequenceValue(const QKeySequence::StandardKey &standardKey,
+ explicit PropertySheetKeySequenceValue(const QKeySequence::StandardKey &standardKey,
bool translatable = true,
const QString &disambiguation = QString(),
const QString &comment = QString());
diff --git a/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h b/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h
index cf944b9..13b7f74 100644
--- a/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h
@@ -70,7 +70,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerWidgetBox : public QDesignerWidgetBoxInte
public:
enum LoadMode { LoadMerge, LoadReplace, LoadCustomWidgetsOnly };
- QDesignerWidgetBox(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ explicit QDesignerWidgetBox(QWidget *parent = 0, Qt::WindowFlags flags = 0);
LoadMode loadMode() const;
void setLoadMode(LoadMode lm);
diff --git a/tools/designer/src/lib/shared/qtresourceview_p.h b/tools/designer/src/lib/shared/qtresourceview_p.h
index 26c4754..8da2975 100644
--- a/tools/designer/src/lib/shared/qtresourceview_p.h
+++ b/tools/designer/src/lib/shared/qtresourceview_p.h
@@ -68,7 +68,7 @@ class QDESIGNER_SHARED_EXPORT QtResourceView : public QWidget
{
Q_OBJECT
public:
- QtResourceView(QDesignerFormEditorInterface *core, QWidget *parent = 0);
+ explicit QtResourceView(QDesignerFormEditorInterface *core, QWidget *parent = 0);
~QtResourceView();
void setDragEnabled(bool dragEnabled);
@@ -120,7 +120,7 @@ class QDESIGNER_SHARED_EXPORT QtResourceViewDialog : public QDialog
{
Q_OBJECT
public:
- QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0);
+ explicit QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0);
virtual ~QtResourceViewDialog();
QString selectedResource() const;
diff --git a/tools/designer/src/lib/shared/richtexteditor_p.h b/tools/designer/src/lib/shared/richtexteditor_p.h
index 4157d2c..44023ef 100644
--- a/tools/designer/src/lib/shared/richtexteditor_p.h
+++ b/tools/designer/src/lib/shared/richtexteditor_p.h
@@ -72,7 +72,7 @@ class QDESIGNER_SHARED_EXPORT RichTextEditorDialog : public QDialog
{
Q_OBJECT
public:
- RichTextEditorDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0);
+ explicit RichTextEditorDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0);
~RichTextEditorDialog();
int showDialog();
diff --git a/tools/designer/src/lib/shared/shared_settings.cpp b/tools/designer/src/lib/shared/shared_settings.cpp
index d6fd4bc..281b5c6 100644
--- a/tools/designer/src/lib/shared/shared_settings.cpp
+++ b/tools/designer/src/lib/shared/shared_settings.cpp
@@ -161,7 +161,7 @@ QStringList QDesignerSharedSettings::additionalFormTemplatePaths() const
{
// get template paths excluding internal ones
QStringList rc = formTemplatePaths();
- foreach (QString internalTemplatePath, defaultFormTemplatePaths()) {
+ foreach (const QString &internalTemplatePath, defaultFormTemplatePaths()) {
const int index = rc.indexOf(internalTemplatePath);
if (index != -1)
rc.removeAt(index);
diff --git a/tools/designer/src/lib/shared/textpropertyeditor_p.h b/tools/designer/src/lib/shared/textpropertyeditor_p.h
index 5b913ac..48f7898 100644
--- a/tools/designer/src/lib/shared/textpropertyeditor_p.h
+++ b/tools/designer/src/lib/shared/textpropertyeditor_p.h
@@ -90,7 +90,7 @@ namespace qdesigner_internal {
UpdateOnFinished
};
- TextPropertyEditor(QWidget *parent = 0, EmbeddingMode embeddingMode = EmbeddingNone, TextPropertyValidationMode validationMode = ValidationMultiLine);
+ explicit TextPropertyEditor(QWidget *parent = 0, EmbeddingMode embeddingMode = EmbeddingNone, TextPropertyValidationMode validationMode = ValidationMultiLine);
TextPropertyValidationMode textPropertyValidationMode() const { return m_validationMode; }
void setTextPropertyValidationMode(TextPropertyValidationMode vm);
diff --git a/tools/designer/src/lib/shared/widgetdatabase_p.h b/tools/designer/src/lib/shared/widgetdatabase_p.h
index 0e99999..873e79b 100644
--- a/tools/designer/src/lib/shared/widgetdatabase_p.h
+++ b/tools/designer/src/lib/shared/widgetdatabase_p.h
@@ -74,8 +74,8 @@ namespace qdesigner_internal {
class QDESIGNER_SHARED_EXPORT WidgetDataBaseItem: public QDesignerWidgetDataBaseItemInterface
{
public:
- WidgetDataBaseItem(const QString &name = QString(),
- const QString &group = QString());
+ explicit WidgetDataBaseItem(const QString &name = QString(),
+ const QString &group = QString());
QString name() const;
void setName(const QString &name);
@@ -159,7 +159,7 @@ class QDESIGNER_SHARED_EXPORT WidgetDataBase: public QDesignerWidgetDataBaseInte
{
Q_OBJECT
public:
- WidgetDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0);
+ explicit WidgetDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0);
virtual ~WidgetDataBase();
virtual QDesignerFormEditorInterface *core() const;
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index 1d2d6f8..a0c9e83 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -364,7 +364,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge
const QStringList zOrderNames = ui_widget->elementZOrder();
if (!zOrderNames.isEmpty()) {
QList<QWidget *> zOrder = qVariantValue<QWidgetList>(w->property("_q_zOrder"));
- foreach (QString widgetName, zOrderNames) {
+ foreach (const QString &widgetName, zOrderNames) {
if (QWidget *child = qFindChild<QWidget*>(w, widgetName)) {
if (child->parentWidget() == w) {
zOrder.removeAll(child);
diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp
index cc8483f..c97daac 100644
--- a/tools/designer/src/lib/uilib/formbuilder.cpp
+++ b/tools/designer/src/lib/uilib/formbuilder.cpp
@@ -494,7 +494,7 @@ void QFormBuilder::updateCustomWidgets()
{
m_customWidgets.clear();
- foreach (QString path, m_pluginPaths) {
+ foreach (const QString &path, m_pluginPaths) {
const QDir dir(path);
const QStringList candidates = dir.entryList(QDir::Files);
diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h b/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h
index c48449c..9f3c252 100644
--- a/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h
+++ b/tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h
@@ -77,7 +77,7 @@ class QAxWidgetExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- QAxWidgetExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit QAxWidgetExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h b/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h
index 1308fe2..50132a6 100644
--- a/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h
+++ b/tools/designer/src/plugins/activeqt/qdesigneraxwidget.h
@@ -105,7 +105,7 @@ private:
class QDesignerAxPluginWidget : public QDesignerAxWidget
{
- // No Q_OBJECT here! - meta functionality is overriden
+ // No Q_OBJECT here! - meta functionality is overridden
public:
explicit QDesignerAxPluginWidget(QWidget *parent);
virtual ~QDesignerAxPluginWidget();
diff --git a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h
index 49a8a40..4f2b3b2 100644
--- a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h
@@ -81,7 +81,7 @@ class Q3IconViewExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3IconViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3IconViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h
index 19213d8..e20e344 100644
--- a/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h
@@ -51,7 +51,7 @@ class Q3IconViewPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3IconViewPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3IconViewPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h
index 7e291b6..bfb6738 100644
--- a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h
@@ -79,7 +79,7 @@ class Q3ListBoxExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3ListBoxExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3ListBoxExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h
index 66002f5..68d6913 100644
--- a/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h
@@ -51,7 +51,7 @@ class Q3ListBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ListBoxPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ListBoxPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h b/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h
index f14f256..e5222ed 100644
--- a/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h
@@ -82,7 +82,7 @@ class Q3ListViewExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3ListViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3ListViewExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h b/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h
index 7127a57..f9c82a2 100644
--- a/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h
@@ -51,7 +51,7 @@ class Q3ListViewPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ListViewPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ListViewPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h b/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h
index de2a75e..4ac7daa 100644
--- a/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h
@@ -51,7 +51,7 @@ class Q3MainWindowPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3MainWindowPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3MainWindowPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h b/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h
index 40222bd..4de8b71 100644
--- a/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h
@@ -79,7 +79,7 @@ class Q3TableExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3TableExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3TableExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h
index 94f663a..beeaf3b 100644
--- a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h
@@ -79,7 +79,7 @@ class Q3TextEditExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3TextEditExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3TextEditExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h
index 28e0386..77bfb58 100644
--- a/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h
@@ -51,7 +51,7 @@ class Q3TextEditPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3TextEditPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3TextEditPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h
index f3ed995..22562b1 100644
--- a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h
+++ b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h
@@ -78,7 +78,7 @@ class Q3ToolBarExtraInfoFactory: public QExtensionFactory
{
Q_OBJECT
public:
- Q3ToolBarExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
+ explicit Q3ToolBarExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent = 0);
protected:
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
diff --git a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
index c79390c..c750cfe 100644
--- a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
+++ b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
@@ -51,7 +51,7 @@ class Q3ButtonGroupPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ButtonGroupPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ButtonGroupPlugin(const QIcon &icon, QObject *parent = 0);
virtual ~Q3ButtonGroupPlugin();
virtual QString name() const;
@@ -80,7 +80,7 @@ class Q3ComboBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ComboBoxPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ComboBoxPlugin(const QIcon &icon, QObject *parent = 0);
virtual ~Q3ComboBoxPlugin();
virtual QString name() const;
@@ -109,7 +109,7 @@ class Q3DateEditPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3DateEditPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3DateEditPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
@@ -157,7 +157,7 @@ class Q3FramePlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3FramePlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3FramePlugin(const QIcon &icon, QObject *parent = 0);
virtual ~Q3FramePlugin();
virtual QString name() const;
@@ -215,7 +215,7 @@ class Q3ProgressBarPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ProgressBarPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ProgressBarPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
@@ -263,7 +263,7 @@ class Q3TimeEditPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3TimeEditPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3TimeEditPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
index 524f3fd..e8cf4fa 100644
--- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
+++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
@@ -59,7 +59,7 @@ class Q3WizardHelper : public QObject
{
Q_OBJECT
public:
- Q3WizardHelper(Q3Wizard *wizard);
+ explicit Q3WizardHelper(Q3Wizard *wizard);
private slots:
void slotCurrentChanged();
private:
diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h
index 1837769..c9fff40 100644
--- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h
@@ -51,7 +51,7 @@ class Q3WizardPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3WizardPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3WizardPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/shared/findwidget/texteditfindwidget.h b/tools/shared/findwidget/texteditfindwidget.h
index 3034a42..a051f0e 100644
--- a/tools/shared/findwidget/texteditfindwidget.h
+++ b/tools/shared/findwidget/texteditfindwidget.h
@@ -53,7 +53,7 @@ class TextEditFindWidget : public AbstractFindWidget
Q_OBJECT
public:
- TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
+ explicit TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
QTextEdit *textEdit() const
{ return m_textEdit; }
diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp
index 0b6f394..ad297df 100644
--- a/tools/shared/fontpanel/fontpanel.cpp
+++ b/tools/shared/fontpanel/fontpanel.cpp
@@ -217,7 +217,7 @@ void FontPanel::updateFamily(const QString &family)
const QString normalStyle = QLatin1String("Normal");
if (hasStyles) {
- foreach (QString style, styles) {
+ foreach (const QString &style, styles) {
// try to maintain selection or select 'normal' preferably
const int newIndex = m_styleComboBox->count();
m_styleComboBox->addItem(style);
diff --git a/tools/shared/qtgradienteditor/qtgradientutils.cpp b/tools/shared/qtgradienteditor/qtgradientutils.cpp
index 9fa0324..083ba89 100644
--- a/tools/shared/qtgradienteditor/qtgradientutils.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientutils.cpp
@@ -395,7 +395,7 @@ static QStringList styleSheetParameters(const QGradient &gradient)
static QStringList styleSheetStops(const QGradient &gradient)
{
QStringList result;
- foreach (QGradientStop stop, gradient.stops()) {
+ foreach (const QGradientStop &stop, gradient.stops()) {
const QColor color = stop.second;
const QString stopDescription = QLatin1String("stop:") + QString::number(stop.first) + QLatin1String(" rgba(")
diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.h b/tools/shared/qttoolbardialog/qttoolbardialog.h
index a1c099a..e182368 100644
--- a/tools/shared/qttoolbardialog/qttoolbardialog.h
+++ b/tools/shared/qttoolbardialog/qttoolbardialog.h
@@ -68,7 +68,7 @@ class QtToolBarManager : public QObject
Q_OBJECT
public:
- QtToolBarManager(QObject *parent = 0);
+ explicit QtToolBarManager(QObject *parent = 0);
~QtToolBarManager();
void setMainWindow(QMainWindow *mainWindow);
@@ -100,7 +100,7 @@ class QtToolBarDialog : public QDialog
Q_OBJECT
public:
- QtToolBarDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ explicit QtToolBarDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0);
~QtToolBarDialog();
void setToolBarManager(QtToolBarManager *toolBarManager);
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp
index 705c0ec..93873fb 100644
--- a/util/s60pixelmetrics/pixel_metrics.cpp
+++ b/util/s60pixelmetrics/pixel_metrics.cpp
@@ -50,7 +50,7 @@
// so that we can keep dynamic and static values inline.
// Please adjust version data if correcting dynamic PM calculations.
const TInt KPMMajorVersion = 1;
-const TInt KPMMinorVersion = 15;
+const TInt KPMMinorVersion = 16;
TPixelMetricsVersion PixelMetrics::Version()
{
@@ -855,19 +855,26 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
case QStyle::PM_FocusFrameHMargin:
case QStyle::PM_FocusFrameVMargin:
{
- TAknLayoutRect gridRect;
- gridRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::grid_highlight_pane(0));
- TAknLayoutRect gridRectCenter;
- gridRectCenter.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::cell_highlight_pane_g1());
+ TAknLayoutRect listScrollPane;
+ listScrollPane.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::listscroll_gen_pane(0));
+ TAknLayoutRect listGenPane;
+ listGenPane.LayoutRect(listScrollPane.Rect(), AknLayoutScalable_Avkon::list_gen_pane(0));
+ TAknLayoutRect listSinglePane;
+ listSinglePane.LayoutRect(listGenPane.Rect(), AknLayoutScalable_Avkon::list_single_pane(0));
+ TAknLayoutText listSinglePaneText;
+ listSinglePaneText.LayoutText(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_single_pane_t1(0));
+ TAknLayoutRect highlightRect;
+ highlightRect.LayoutRect(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_highlight_pane_cp1().LayoutLine());
// The difference of center piece from border tell the frame width.
if ( value == QStyle::PM_FocusFrameHMargin)
{
- value = gridRect.Rect().iBr.iX - gridRectCenter.Rect().iBr.iX;
+ //use topleft for horizontal as S60 uses different values for right and left borders
+ value = listSinglePaneText.TextRect().iTl.iX - highlightRect.Rect().iTl.iX;
}
else
{
- value = gridRect.Rect().iBr.iY - gridRectCenter.Rect().iBr.iY;
+ value = highlightRect.Rect().iBr.iY - listSinglePaneText.TextRect().iBr.iY;
}
}
break;