From 027a99e447b2d9c4d83fd0580851e803fe372c3a Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 28 Aug 2009 14:11:36 +0300 Subject: Updated docs to reflect current 'createpackage' and 'make sisx' syntax. Reviewed-by: Miikka Heikkinen --- doc/src/s60-introduction.qdoc | 48 ++++++++++++++++++---- doc/src/snippets/code/doc_src_installation.qdoc | 6 +-- .../snippets/code/doc_src_s60-introduction.qdoc | 16 +++++++- qmake/generators/symbian/symmake.cpp | 2 +- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/doc/src/s60-introduction.qdoc b/doc/src/s60-introduction.qdoc index 24f7817..41a0268 100644 --- a/doc/src/s60-introduction.qdoc +++ b/doc/src/s60-introduction.qdoc @@ -90,6 +90,7 @@ \row \o \c debug-armv5 \o Build debug binaries for hardware using RVCT. \row \o \c release-armv5 \o Build release binaries for hardware using RVCT. \row \o \c run \o Run the emulator binaries from the build directory. + \row \o \c sisx \o Create signed \c .sis file for project. \endtable The following lines perform a debug build for the emulator @@ -102,16 +103,47 @@ \section1 Installing your own applications - To install your own applications on hardware, Qt comes with a tool called - \c createpackage. When used on the \c .pkg files created by qmake, it - will produce a signed \c .sis file that can be installed to the device. For - example: - + To install your own applications on hardware, you need signed \c .sis file. + The signed \c .sis file can be created with \c make \c sisx target. \c sisx target + is only supported for executables or projects with \c DEPLOYMENT statements. + By default the \c sisx target will create signed \.sis file for last build + target. For example, the following sequence will generate the needed makefiles, + build the project for \c debug-winscw and \c release-armv5, and create + self-signed \c .sis file for \c release-armv5 target: + \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 2 + If you want to use different certificate information or override the default + target for \c .sis file creation you can use the environment variables as + shown in the table below: + + \table + \row \o \c QT_SISX_OPTIONS \o Options accepted by \c .sis creation. + Currently only -i, install the package right away + using PC suite, is supported. + By default no otions are given. + \row \o \c QT_SISX_TARGET \o Target for which \c .sis file is created. + Accepted values are build targets listed in + previous table. By default last build target. + \row \o \c QT_SISX_CERTIFICATE \o The certificate file used for signing. + By default self-signed certificate. + \row \o \c QT_SISX_KEY \o The certificate's private key file. + By default key is associated to self-signed certificate. + \row \o \c QT_SISX_PASSPHRASE \o The certificate's private key file's passphrase. + By default empty. + \endtable + + The environment variables for \c make can be given as an parameters. For example: + + \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 3 + + The above example is identical to: + + \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 4 + If you want to install the program immediately, make sure that the device - is connected to the computer in "PC Suite" mode, and run \c createpackage - with the \c -i switch, like this: + is connected to the computer in "PC Suite" mode, and run \c sisx target + with the \c QT_SISX_OPTIONS=-i, like this: - \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 3 + \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 5 */ diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc index 489016d..ef46bf6 100644 --- a/doc/src/snippets/code/doc_src_installation.qdoc +++ b/doc/src/snippets/code/doc_src_installation.qdoc @@ -129,7 +129,7 @@ nmake //! [23] cd \Qt\%VERSION% -configure -platform win32-mwc -xplatform symbian-abld +configure -platform win32-g++ -xplatform symbian-abld //! [23] @@ -156,10 +156,10 @@ make release-armv5 //! [29] cd src\s60installs -createpackage -i qt_libs_armv5_urel.pkg +make sisx QT_SISX_OPTIONS=-i QT_SISX_CERTIFICATE= QT_SISX_KEY= //! [29] //! [30] cd embedded\fluidlauncher -createpackage -i fluidlauncher_armv5_urel.pkg +make sisx QT_SISX_OPTIONS=-i //! [30] diff --git a/doc/src/snippets/code/doc_src_s60-introduction.qdoc b/doc/src/snippets/code/doc_src_s60-introduction.qdoc index ff1d159..fa9fd45 100644 --- a/doc/src/snippets/code/doc_src_s60-introduction.qdoc +++ b/doc/src/snippets/code/doc_src_s60-introduction.qdoc @@ -8,9 +8,21 @@ //! [1] //! [2] - createpackage wiggly_gcce_udeb.pkg + qmake + make debug-winscw release-armv5 + make sisx //! [2] //! [3] - createpackage -i wiggly_gcce_udeb.pkg + make sisx QT_SISX_TARGET=debug-armv5 //! [3] + +//! [4] + set QT_SISX_TARGET=debug-armv5 + make sisx +//! [4] + +//! [5] + set QT_SISX_OPTIONS=-i + make sisx +//! [5] \ No newline at end of file diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 48fc8ef..3aa3c7b 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1649,7 +1649,7 @@ void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t) t << OK_SISX_TARGET ":" << endl; - QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(QT_SISX_TARGET) " \ + QString pkgcommand = QString("\tcreatepackage.bat $(QT_SISX_OPTIONS) %1_template.%2 $(QT_SISX_TARGET) " \ "$(QT_SISX_CERTIFICATE) $(QT_SISX_KEY) $(QT_SISX_PASSPHRASE)") .arg(fixedTarget) .arg("pkg"); -- cgit v0.12 From 3b74c6350ab789c31a938df0807c8c9399bc4fcb Mon Sep 17 00:00:00 2001 From: Keith Isdale Date: Mon, 31 Aug 2009 13:58:40 +1000 Subject: Correct grammatical in documentation for QNetworkDiskCache::expire() The text: When the current size of the cache is greater then the maximumCacheSize() should read When the current size of the cache is greater than the maximumCacheSize() Task-number: 260496 Reviewed-by: Zheng Liu (George) --- src/network/access/qnetworkdiskcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index 167f5d5..21d52c8 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -466,7 +466,7 @@ void QNetworkDiskCache::setMaximumCacheSize(qint64 size) Cleans the cache so that its size is under the maximum cache size. Returns the current size of the cache. - When the current size of the cache is greater then the maximumCacheSize() + When the current size of the cache is greater than the maximumCacheSize() older cache files are removed until the total size is less then 90% of maximumCacheSize() starting with the oldest ones first using the file creation date to determine how old a cache file is. -- cgit v0.12 From 10c3a3bf11d6bbd8f8e99028ecab41acb89b7273 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 31 Aug 2009 15:26:12 +1000 Subject: Fix license headers. Reviewed-by: Trust Me --- doc/src/snippets/qxmlquery/bindingExample.cpp | 41 +++++++++++++++ doc/src/snippets/signalmapper/filereader.cpp | 41 +++++++++++++++ doc/src/snippets/signalmapper/main.cpp | 41 +++++++++++++++ src/xmlpatterns/parser/qquerytransformparser.cpp | 61 ---------------------- .../xmlpatternsxqts/lib/tests/XMLWriterTest.cpp | 41 --------------- 5 files changed, 123 insertions(+), 102 deletions(-) diff --git a/doc/src/snippets/qxmlquery/bindingExample.cpp b/doc/src/snippets/qxmlquery/bindingExample.cpp index 8ed9974..15905cd 100644 --- a/doc/src/snippets/qxmlquery/bindingExample.cpp +++ b/doc/src/snippets/qxmlquery/bindingExample.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QBuffer device; device.setData(myQString.toUtf8()); diff --git a/doc/src/snippets/signalmapper/filereader.cpp b/doc/src/snippets/signalmapper/filereader.cpp index 8732dab..c25a8a7 100644 --- a/doc/src/snippets/signalmapper/filereader.cpp +++ b/doc/src/snippets/signalmapper/filereader.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include #include "filereader.h" diff --git a/doc/src/snippets/signalmapper/main.cpp b/doc/src/snippets/signalmapper/main.cpp index ebc601b..744b0b3 100644 --- a/doc/src/snippets/signalmapper/main.cpp +++ b/doc/src/snippets/signalmapper/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include #include "filereader.h" diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp index 4a960c3..d2cfbf3 100644 --- a/src/xmlpatterns/parser/qquerytransformparser.cpp +++ b/src/xmlpatterns/parser/qquerytransformparser.cpp @@ -39,16 +39,6 @@ ** ****************************************************************************/ -// -// 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. - /* A Bison parser, made by GNU Bison 2.3a. */ /* Skeleton implementation for Bison's Yacc-like parsers in C @@ -123,57 +113,6 @@ /* Line 164 of yacc.c. */ #line 22 "querytransformparser.ypp" -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtXmlPatterns module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. - #include #include diff --git a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.cpp b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.cpp index 1f603ff..15b7e0b 100644 --- a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.cpp +++ b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Trolltech Labs. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** - */ #include -- cgit v0.12 From cdb689777841e40d6b017f3e57bcce62992c10b6 Mon Sep 17 00:00:00 2001 From: Keith Isdale Date: Mon, 31 Aug 2009 17:18:10 +1000 Subject: Update the qmake autotest: re MSVC test failure findMocs and findDeps When MSVC is used the default DESTDIR makes use a release/debug suffix. For these tests DESTDIR needs to be "."/ Minor code cleanup was done whilst correcting these effected .pro files Reviewed-by: Lincoln Ramsay --- tests/auto/qmake/testdata/findDeps/findDeps.pro | 7 ++----- tests/auto/qmake/testdata/findMocs/findMocs.pro | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/auto/qmake/testdata/findDeps/findDeps.pro b/tests/auto/qmake/testdata/findDeps/findDeps.pro index e0a2b86..43577b5 100644 --- a/tests/auto/qmake/testdata/findDeps/findDeps.pro +++ b/tests/auto/qmake/testdata/findDeps/findDeps.pro @@ -1,11 +1,8 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Thu Mar 12 11:08:20 2009 -###################################################################### - TEMPLATE = app -TARGET = +TARGET = findDeps DEPENDPATH += . INCLUDEPATH += . +DESTDIR = ./ # Input HEADERS += object1.h \ diff --git a/tests/auto/qmake/testdata/findMocs/findMocs.pro b/tests/auto/qmake/testdata/findMocs/findMocs.pro index daa3c7f..1469b4c 100644 --- a/tests/auto/qmake/testdata/findMocs/findMocs.pro +++ b/tests/auto/qmake/testdata/findMocs/findMocs.pro @@ -1,11 +1,8 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Mar 11 16:11:09 2009 -###################################################################### - TEMPLATE = app -TARGET = +TARGET = findMocs DEPENDPATH += . INCLUDEPATH += . +DESTDIR = ./ # Input HEADERS += object1.h object2.h object3.h object4.h object5.h object6.h object7.h -- cgit v0.12 From 3f44ecdaa7366a69545f331a20988f7753158123 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 31 Aug 2009 10:38:16 +0300 Subject: Removed hard-coded sqlite3 deployment statement - used PKG conditions. Before this change Qt did not install to device which had sqlite3 already in ROM. Since we now install the sqlite3 only if it is not on any drive, the installation works also with preinstalled sqlite. Even better appraoch would be to use embedded SIS file for sqlite, since that would allow sqlite3 upgrade without upgrading the whole Qt. However we yet don't have such SIS, but once we get one from Symbian this needs to be further changed. Task-number: 258858 Reviewed-by: Miikka Heikkinen --- src/s60installs/s60installs.pro | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 0314958..d691dd5 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -25,17 +25,13 @@ symbian: { qts60plugin_5_0.dll - # TODO: This should be conditional in PKG file, see commented code below - # However we don't yet have such mechanism in place - contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { - contains(CONFIG, system-sqlite): qtlibraries.sources += sqlite3.dll - } - - #; EXISTS statement does not resolve !. Lets check the most common drives - #IF NOT EXISTS("c:\sys\bin\sqlite3.dll") AND NOT EXISTS("e:\sys\bin\sqlite3.dll") AND NOT EXISTS("z:\sys\bin\sqlite3.dll") - #"\Epoc32\release\armv5\UREL\sqlite3.dll"-"!:\sys\bin\sqlite3.dll" - #ENDIF - + sqlitedeployment = \ + "; EXISTS statement does not resolve!. Lets check the most common drives" \ + "IF NOT EXISTS(\"c:\\sys\\bin\\sqlite3.dll\") AND NOT EXISTS(\"e:\\sys\\bin\\sqlite3.dll\") AND NOT EXISTS(\"z:\\sys\\bin\\sqlite3.dll\")" \ + "\"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/sqlite3.dll\"-\"!:\\sys\\bin\\sqlite3.dll\"" \ + "ENDIF" + qtlibraries.pkg_postrules = sqlitedeployment + qtlibraries.path = /sys/bin vendorinfo = \ -- cgit v0.12 From 01ee1740290ad192f98bb1d3d24e419e08be5806 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 31 Aug 2009 10:45:05 +0300 Subject: Trivial change to comment. Reviewed-by: TrustMe --- src/s60installs/s60installs.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index d691dd5..390cc11 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -6,6 +6,7 @@ symbian: { SUBDIRS= # WARNING: Changing TARGET name will break Symbian SISX upgrade functionality + # DO NOT TOUCH TARGET VARIABLE IF YOU ARE NOT SURE WHAT YOU ARE DOING TARGET = "Qt for S60" TARGET.UID3 = 0x2001E61C VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} -- cgit v0.12 From 10e3f11057218dac621087980bc37db464838941 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 31 Aug 2009 10:46:01 +0300 Subject: Fixed createpackage to use lowercase target to be Linux compliant. All S60 SDK paths in Linux are lowercase. Reviewed-by: TrustMe --- bin/createpackage.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index af46e04..a180864 100644 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -52,7 +52,7 @@ unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly) # Read params to variables my $templatepkg = $ARGV[0]; -my $targetplatform = uc $ARGV[1]; +my $targetplatform = lc $ARGV[1]; my @tmpvalues = split('-', $targetplatform); my $target = $tmpvalues[0]; -- cgit v0.12 From 9f7fd4923e04b3a5022e1f9b60ec1823918aefac Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Sat, 29 Aug 2009 18:04:18 +0200 Subject: Benchmark test for QSvgRenderer. Right now mostly testing the constructor and the parser. The only SVG to be tested so far is tiger.svg, i.e. the famous Tiger head converted from tiger.eps found in GPL-ed Ghostscript. Reviewed-by: Kim --- tests/benchmarks/qsvgrenderer/data/tiger.svg | 730 +++++++++++++++++++++ tests/benchmarks/qsvgrenderer/qsvgrenderer.pro | 9 + tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc | 6 + tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp | 103 +++ 4 files changed, 848 insertions(+) create mode 100644 tests/benchmarks/qsvgrenderer/data/tiger.svg create mode 100644 tests/benchmarks/qsvgrenderer/qsvgrenderer.pro create mode 100644 tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc create mode 100644 tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp diff --git a/tests/benchmarks/qsvgrenderer/data/tiger.svg b/tests/benchmarks/qsvgrenderer/data/tiger.svg new file mode 100644 index 0000000..983e570 --- /dev/null +++ b/tests/benchmarks/qsvgrenderer/data/tiger.svg @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro b/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro new file mode 100644 index 0000000..8222a09 --- /dev/null +++ b/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro @@ -0,0 +1,9 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qsvgrenderer + +SOURCES += tst_qsvgrenderer.cpp +RESOURCES += qsvgrenderer.qrc + +QT += svg + diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc b/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc new file mode 100644 index 0000000..bdf4a31 --- /dev/null +++ b/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc @@ -0,0 +1,6 @@ + + + data/tiger.svg + + + diff --git a/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp new file mode 100644 index 0000000..2f01dfa --- /dev/null +++ b/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include +#include + +//TESTED_FILES= + +class tst_QSvgRenderer : public QObject +{ + Q_OBJECT + +public: + tst_QSvgRenderer(); + virtual ~tst_QSvgRenderer(); + +public slots: + void init(); + void cleanup(); + +private slots: + void construct(); + void load(); +}; + +tst_QSvgRenderer::tst_QSvgRenderer() +{ +} + +tst_QSvgRenderer::~tst_QSvgRenderer() +{ +} + +void tst_QSvgRenderer::init() +{ +} + +void tst_QSvgRenderer::cleanup() +{ +} + +void tst_QSvgRenderer::construct() +{ + QBENCHMARK { + QSvgRenderer renderer; + } +} + +void tst_QSvgRenderer::load() +{ + QFile file(":/data/tiger.svg"); + if (!file.open(QFile::ReadOnly)) + QFAIL("Can not open tiger.svg"); + QByteArray data = file.readAll(); + QSvgRenderer renderer; + + QBENCHMARK { + renderer.load(data); + } +} + +QTEST_MAIN(tst_QSvgRenderer) +#include "tst_qsvgrenderer.moc" -- cgit v0.12 From 8529d7e3ace4994cd2caf563bb437f2c5c38bcee Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Aug 2009 18:35:43 +0200 Subject: Add an opt-in QWeakPointer::operator->. To use this, you must add #define QWEAKPOINTER_ENABLE_ARROW to your .cpp before #including any headers. Be careful about adding this to .h files. Reviewed-by: Olivier Goffart --- src/corelib/tools/qsharedpointer_impl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index e4f7ba9..a4282e1 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -626,6 +626,10 @@ public: inline QSharedPointer toStrongRef() const { return QSharedPointer(*this); } +#if defined(QWEAKPOINTER_ENABLE_ARROW) + inline T *operator->() const { return data(); } +#endif + private: #if defined(Q_NO_TEMPLATE_FRIENDS) -- cgit v0.12 From 624ea78d71dca5112272597f9f1ee165c2275c5c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 Aug 2009 11:54:22 +0200 Subject: Autotest: add some D-Bus tests sending complex structs and lists of them --- tests/auto/qdbusmarshall/common.h | 35 ++++++++++++++++++++++++++ tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp | 18 +++++++++++++ 2 files changed, 53 insertions(+) diff --git a/tests/auto/qdbusmarshall/common.h b/tests/auto/qdbusmarshall/common.h index 9df1e01..bdc9f09 100644 --- a/tests/auto/qdbusmarshall/common.h +++ b/tests/auto/qdbusmarshall/common.h @@ -103,6 +103,34 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, MyStruct &ms) return arg; } +struct MyVariantMapStruct +{ + QString s; + QVariantMap map; + + inline bool operator==(const MyVariantMapStruct &other) const + { return s == other.s && map == other.map; } +}; +Q_DECLARE_METATYPE(MyVariantMapStruct) +Q_DECLARE_METATYPE(QList) + +QDBusArgument &operator<<(QDBusArgument &arg, const MyVariantMapStruct &ms) +{ + arg.beginStructure(); + arg << ms.s << ms.map; + arg.endStructure(); + return arg; +} + +const QDBusArgument &operator>>(const QDBusArgument &arg, MyVariantMapStruct &ms) +{ + arg.beginStructure(); + arg >> ms.s >> ms.map; + arg.endStructure(); + return arg; +} + + void commonInit() { qDBusRegisterMetaType >(); @@ -127,6 +155,8 @@ void commonInit() qDBusRegisterMetaType >(); qDBusRegisterMetaType(); + qDBusRegisterMetaType(); + qDBusRegisterMetaType >(); } #ifdef USE_PRIVATE_CODE #include "private/qdbusintrospection_p.h" @@ -476,6 +506,11 @@ bool compareToArgument(const QDBusArgument &arg, const QVariant &v2) else if (id == qMetaTypeId()) return compare(arg, v2); + + else if (id == qMetaTypeId()) + return compare(arg, v2); + else if (id == qMetaTypeId >()) + return compare >(arg, v2); } qWarning() << "Unexpected QVariant type" << v2.userType() diff --git a/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp index 6e66393..b209aef 100644 --- a/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp +++ b/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp @@ -492,6 +492,24 @@ void tst_QDBusMarshall::sendStructs_data() QTest::newRow("time") << QVariant(time) << "(iiii)" << "[Argument: (iiii) 12, 25, 0, 0]"; QTest::newRow("datetime") << QVariant(QDateTime(date, time)) << "((iii)(iiii)i)" << "[Argument: ((iii)(iiii)i) [Argument: (iii) 2006, 6, 18], [Argument: (iiii) 12, 25, 0, 0], 0]"; + + MyStruct ms = { 1, "Hello, World" }; + QTest::newRow("int-string") << qVariantFromValue(ms) << "(is)" << "[Argument: (is) 1, \"Hello, World\"]"; + + MyVariantMapStruct mvms = { "Hello, World", QVariantMap() }; + QTest::newRow("string-variantmap") << qVariantFromValue(mvms) << "(sa{sv})" << "[Argument: (sa{sv}) \"Hello, World\", [Argument: a{sv} {}]]"; + + // use only basic types, otherwise comparison will fail + mvms.map["int"] = 42; + mvms.map["uint"] = 42u; + mvms.map["short"] = qVariantFromValue(-47); + mvms.map["bytearray"] = QByteArray("Hello, world"); + QTest::newRow("string-variantmap2") << qVariantFromValue(mvms) << "(sa{sv})" << "[Argument: (sa{sv}) \"Hello, World\", [Argument: a{sv} {\"bytearray\" = [Variant(QByteArray): {72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100}], \"int\" = [Variant(int): 42], \"short\" = [Variant(short): -47], \"uint\" = [Variant(uint): 42]}]]"; + + QList list; + QTest::newRow("empty-list-of-string-variantmap") << qVariantFromValue(list) << "a(sa{sv})" << "[Argument: a(sa{sv}) {}]"; + list << mvms; + QTest::newRow("list-of-string-variantmap") << qVariantFromValue(list) << "a(sa{sv})" << "[Argument: a(sa{sv}) {[Argument: (sa{sv}) \"Hello, World\", [Argument: a{sv} {\"bytearray\" = [Variant(QByteArray): {72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100}], \"int\" = [Variant(int): 42], \"short\" = [Variant(short): -47], \"uint\" = [Variant(uint): 42]}]]}]"; } void tst_QDBusMarshall::sendComplex_data() -- cgit v0.12 From 37da3aefc073ea3a27c8bb5293b27faa4dcb5cc0 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Fri, 28 Aug 2009 16:52:54 +0200 Subject: No need for the namespaced version in QSvgAttributes::value(). We do not really use this function with proper namespace URI, so let us get rid of the function. Reviewed-by: Kim --- src/svg/qsvghandler.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 5b778d2..44f5b6d 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -82,7 +82,6 @@ struct QSvgAttributes QSvgAttributes(const QXmlStreamAttributes &xmlAttributes, QSvgHandler *handler); QStringRef value(const QLatin1String &name) const; - QStringRef value(const QString &namespaceUri, const QLatin1String &name) const; QXmlStreamAttributes m_xmlAttributes; QVector m_cssAttributes; @@ -110,20 +109,6 @@ QStringRef QSvgAttributes::value(const QLatin1String &name) const return v; } -QStringRef QSvgAttributes::value(const QString &namespaceUri, const QLatin1String &name) const -{ - QStringRef v = m_xmlAttributes.value(namespaceUri, name); - if (v.isEmpty()) { - for (int i = 0; i < m_cssAttributes.count(); ++i) { - if (m_cssAttributes.at(i).name == name) { - v = m_cssAttributes.at(i).value; - break; - } - } - } - return v; -} - static inline QString someId(const QXmlStreamAttributes &attributes) { QString id = attributes.value(QLatin1String("id")).toString(); @@ -2698,9 +2683,9 @@ static bool parseStopNode(QSvgStyleProperty *parent, QSvgGradientStyle *style = static_cast(parent); - QString offsetStr = attrs.value(QString(), QLatin1String("offset")).toString(); - QString colorStr = attrs.value(QString(), QLatin1String("stop-color")).toString(); - QString opacityStr = attrs.value(QString(), QLatin1String("stop-opacity")).toString(); + QString offsetStr = attrs.value(QLatin1String("offset")).toString(); + QString colorStr = attrs.value(QLatin1String("stop-color")).toString(); + QString opacityStr = attrs.value(QLatin1String("stop-opacity")).toString(); QColor color; bool ok = true; -- cgit v0.12 From e42379ebf53a41807791ee243bcebb83c3e2faed Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 31 Aug 2009 10:15:35 +0200 Subject: implement functionExit() callbacks on the JIT The return value is not reported (we need a separate callback for that, just like in the interpreter), but that isn't important to get our tools (i.e. the debugger) working. --- src/script/api/qscriptengineagent.cpp | 11 ++++++ src/script/api/qscriptengineagent_p.h | 7 +--- .../qscriptengineagent/tst_qscriptengineagent.cpp | 44 +++++++++++++++------- 3 files changed, 42 insertions(+), 20 deletions(-) diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index 193ee21..cf60bcb 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -142,6 +142,17 @@ void QScriptEngineAgentPrivate::detach() JSC::Debugger::detach(engine->originalGlobalObject()); } +void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno) +{ + Q_UNUSED(frame); + Q_UNUSED(lineno); +#if ENABLE(JIT) + functionExit(JSC::JSValue(), sourceID); +#else + Q_UNUSED(sourceID); +#endif +} + void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler) { JSC::CallFrame *oldFrame = engine->currentFrame; diff --git a/src/script/api/qscriptengineagent_p.h b/src/script/api/qscriptengineagent_p.h index 9ef1eaf..ba49af5 100644 --- a/src/script/api/qscriptengineagent_p.h +++ b/src/script/api/qscriptengineagent_p.h @@ -110,12 +110,7 @@ public: q_ptr->contextPush(); q_ptr->functionEntry(sourceID); }; - virtual void returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno) - { - Q_UNUSED(frame); - Q_UNUSED(sourceID); - Q_UNUSED(lineno); - } + virtual void returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno); virtual void willExecuteProgram(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno) { Q_UNUSED(frame); diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index f515304..2504951 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -561,8 +561,6 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionCall() spy->clear(); QVERIFY(eng.evaluate("(function() { return 123; } )()").toNumber()==123); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "functionExit() is not called for JS functions when JIT is enabled", Abort); QCOMPARE(spy->count(), 4); // evaluate() entry @@ -576,7 +574,11 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionCall() // anonymous function exit QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(2).scriptId, spy->at(0).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(2).value.isNumber()); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(2).value.toNumber(), qsreal(123)); // evaluate() exit @@ -598,8 +600,6 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionCallWithoutReturn() spy->clear(); eng.evaluate("(function() { var a = 123; } )()"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "functionExit() is not called for JS functions when JIT is enabled", Abort); QCOMPARE(spy->count(), 4); // evaluate() entry @@ -642,8 +642,6 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionDefinition() QVERIFY(spy->at(1).value.isUndefined()); eng.evaluate("foo()"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "functionExit() is not called for JS functions when JIT is enabled", Abort); QCOMPARE(spy->count(), 6); // evaluate() entry @@ -657,7 +655,11 @@ void tst_QScriptEngineAgent::functionEntryAndExit_functionDefinition() // foo() exit QCOMPARE(spy->at(4).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(4).scriptId, spy->at(0).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(4).value.isNumber()); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(4).value.toNumber(), qsreal(456)); // evaluate() exit @@ -719,8 +721,6 @@ void tst_QScriptEngineAgent::functionEntryAndExit_native2() spy->clear(); eng.evaluate("nativeFunctionCallingArg(function() { return 123; })"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "functionExit() is not called for JS functions when JIT is enabled", Abort); QCOMPARE(spy->count(), 6); // evaluate() entry @@ -1035,8 +1035,6 @@ void tst_QScriptEngineAgent::functionEntryAndExit_call() spy->clear(); fun.call(); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "functionExit() is not called for JS functions when JIT is enabled", Abort); QCOMPARE(spy->count(), 2); // entry @@ -1046,7 +1044,11 @@ void tst_QScriptEngineAgent::functionEntryAndExit_call() // exit QCOMPARE(spy->at(1).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(1).value.isNumber()); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QCOMPARE(spy->at(1).value.toNumber(), qsreal(123)); } delete spy; @@ -1650,8 +1652,6 @@ void tst_QScriptEngineAgent::eventOrder_functionDefinition() QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); eng.evaluate("foo(123)"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Some events are missing when JIT is enabled", Abort); QCOMPARE(spy->count(), 13); // load QCOMPARE(spy->at(3).type, ScriptEngineEvent::ScriptLoad); @@ -1774,8 +1774,6 @@ void tst_QScriptEngineAgent::eventOrder_functions() QCOMPARE(spy->count(), 6); eng.evaluate("foo(123)"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "Some events are missing when JIT is enabled", Abort); QCOMPARE(spy->count(), 21); // load @@ -1803,12 +1801,16 @@ void tst_QScriptEngineAgent::eventOrder_functions() // bar() exit QCOMPARE(spy->at(15).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(15).scriptId, spy->at(3).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(15).value.isNumber()); // restore context QCOMPARE(spy->at(16).type, ScriptEngineEvent::ContextPop); // foo() exit QCOMPARE(spy->at(17).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(17).scriptId, spy->at(0).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(17).value.isNumber()); // restore context QCOMPARE(spy->at(18).type, ScriptEngineEvent::ContextPop); @@ -1873,21 +1875,33 @@ void tst_QScriptEngineAgent::eventOrder_functions() // bar() exit QCOMPARE(spy->at(39).type, ScriptEngineEvent::FunctionExit); QCOMPARE(spy->at(39).scriptId, spy->at(21).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(39).value.isError()); // restore context QCOMPARE(spy->at(40).type, ScriptEngineEvent::ContextPop); // foo() exit QCOMPARE(spy->at(41).type, ScriptEngineEvent::FunctionExit); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "script ID for function exit is not correct when JIT is enabled", Continue); QCOMPARE(spy->at(41).scriptId, spy->at(0).scriptId); QVERIFY(spy->at(41).value.isError()); // restore context QCOMPARE(spy->at(42).type, ScriptEngineEvent::ContextPop); // evaluate() exit QCOMPARE(spy->at(43).type, ScriptEngineEvent::FunctionExit); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "script ID for function exit is not correct when JIT is enabled", Continue); QCOMPARE(spy->at(43).scriptId, spy->at(26).scriptId); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "function return value is not reported when JIT is enabled", Continue); QVERIFY(spy->at(43).value.isError()); // unload + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "wrong event type when JIT is enabled", Continue); QCOMPARE(spy->at(44).type, ScriptEngineEvent::ScriptUnload); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "wrong script ID when JIT is enabled", Continue); QCOMPARE(spy->at(44).scriptId, spy->at(25).scriptId); } delete spy; @@ -1946,6 +1960,8 @@ void tst_QScriptEngineAgent::eventOrder_signalsHandling() emit testSignal(123); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "too many events reported when JIT is enabled", Abort); QCOMPARE(spy->count(), 14); // new context QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPush); -- cgit v0.12 From bc8574e03e8aa493393e84675c6d177fc00f12fb Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 31 Aug 2009 10:34:14 +0200 Subject: make sure hasInstance() is always invoked for custom script objects Need to specify the OverridesHasInstance flag, otherwise the JIT will do the standard hasInstance implementation instead of calling our virtual function. This makes the QScriptClass::extension() autotest pass. --- src/script/bridge/qscriptobject_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index 3ae7146..c427202 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -99,7 +99,7 @@ public: static WTF::PassRefPtr createStructure(JSC::JSValue prototype) { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::ImplementsHasInstance)); + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::ImplementsHasInstance | JSC::OverridesHasInstance)); } JSC::JSValue data() const; -- cgit v0.12 From 174bef24f10242b042dad626f8b68a95bdfb7ac7 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 31 Aug 2009 10:38:44 +0200 Subject: don't disable the JIT for qtscript AKA, enable it on platforms where it's supported. --- src/script/script.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/script/script.pro b/src/script/script.pro index 301386d..a03b652 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -13,8 +13,6 @@ include(../qbase.pri) # Disable a few warnings on Windows. win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996 -wd4396 -wd4099 -# disable JIT for now -DEFINES += ENABLE_JIT=0 # FIXME: shared the statically built JavaScriptCore # Fetch the base WebKit directory from the WEBKITDIR environment variable; -- cgit v0.12