6 years agoRemove the use of the QWidgetStar metatypeid.
Stephen Kelly [Wed, 8 Aug 2012 08:23:04 +0000 (10:23 +0200)]
Remove the use of the QWidgetStar metatypeid.

It is to be removed, and is obsoleted by QMetaType::PointerToQObject.
By using QMetaType::PointerToQObject, we also gain the feature
that all pointers to types derived from QObject return true for

Change-Id: I18392b5b6cde3a45d060c37612d987a5cf8e8f18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoMake QScriptEngine::uncaughtExceptionBacktrace() work again
Kent Hansen [Wed, 15 Aug 2012 09:46:23 +0000 (11:46 +0200)]
Make QScriptEngine::uncaughtExceptionBacktrace() work again

This function has been broken since Qt 4.6 (when the JavaScriptCore-
based back-end was introduced). Fix it by introducing a callback in
JSC that allows us to capture the stack when an uncaught exception

Task-number: QTBUG-6139
Change-Id: I4a829323c9fb0c8b2f16a2e5d6f0aeb13cc32561
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoRemove dead code from backtrace autotest
Kent Hansen [Tue, 14 Aug 2012 11:20:25 +0000 (13:20 +0200)]
Remove dead code from backtrace autotest

With the JSC-based back-end, Error objects don't have a "stack"
property, and there is no Error.backtrace() function. Commit
a670b4756885b106db04651cd2a7030e02f0cc2f removed all mention of them
from the documentation, but not from the autotest; this code wasn't
reached anymore because of a preceding QEXPECT_FAIL in the autotest

Change-Id: Ib34cbd5edff126137cec02bf68624e4a102ace84
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoAdd default conversion for types long and ulong
Kent Hansen [Mon, 13 Aug 2012 07:47:43 +0000 (09:47 +0200)]
Add default conversion for types long and ulong

Such conversion is not guaranteed to be lossless on all platforms,
but it's still reasonable to support these types by default.
JSC::JSValue already had constructors for them.

The type matching / overload resolution in the QObject binding
already handled long and ulong, but the value conversion itself
was missing, for some reason.

Task-number: QTBUG-2124
Change-Id: I14ff29a8e949403234b7659c0aca8b48bcdbda0e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoSuppress JavaScriptCore 'LEAK' messages at application exit
Kent Hansen [Fri, 10 Aug 2012 10:28:11 +0000 (12:28 +0200)]
Suppress JavaScriptCore 'LEAK' messages at application exit

In debug mode, if a QScriptEngine was never destroyed, JavaScriptCore
would output a message like

LEAK: 120 Structure

on stderr at exit.
This is not terribly helpful to users; also, it's not common for Qt
classes to produce such output. Since JavaScriptCore's only usage of
the logging facility is for reporting these "leaks", we can disable
logging altogether.

Task-number: QTBUG-18201
Change-Id: Id598bd1f48129d821a954cc49d8e3ab715d78426
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agomake use of QT_PRIVATE to specify private Qt dependencies
Oswald Buddenhagen [Tue, 7 Aug 2012 17:35:44 +0000 (19:35 +0200)]
make use of QT_PRIVATE to specify private Qt dependencies

Change-Id: I05b18befb71ef0483ee5a40dab6163f0612782e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
6 years agofollow rename of qt_module_config.prf to qt_module.prf
Oswald Buddenhagen [Tue, 7 Aug 2012 17:11:55 +0000 (19:11 +0200)]
follow rename of qt_module_config.prf to qt_module.prf

Change-Id: Ied05f26ee735d63a89a5bcf9b7afbeaa8e70809c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
6 years agoFix GC issues related to QObject connections and ownership
Kent Hansen [Thu, 2 Aug 2012 12:27:40 +0000 (14:27 +0200)]
Fix GC issues related to QObject connections and ownership

Issue 1: Even if a sender object was only weakly referenced, the
connection's slot function would still get marked. If the slot was a
closure, its scope could hold a reference to the sender object, so by
marking the closure, the sender would get marked, too - even if there
were no other references to the closure outside of the QObject
connection structure. This would cause the sender object to stay
alive, rather than being garbage-collected (i.e., it leaked).

Issue 2: It's possible that a closure used as a slot in a connection
for one QObject holds the only reference to another QObject that has
connections of its own. In that case, if the first object is
explicitly referenced, the second object (and its connections) should
get marked. But depending on the order in which the connections were
marked, the second object might get treated incorrectly.

This commit solves both issues by introducing an iterative scheme for
marking connections. The first pass marks only connections whose
sender object is referenced elsewhere in the JS environment. The
second pass marks connections whose sender object is referenced by
slots of the connections marked in the first pass. And so on, until
no more connections should be marked. At that point, any remaining
unmarked connections are effectively dead (belonging to QObjects that
can be reclaimed by the GC).

Task-number: QTBUG-26590
Change-Id: I50aa66f7fe407a6827b6f2a12e027275a2fb4655
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
6 years agoMove test helper function to separate header file
Kent Hansen [Wed, 8 Aug 2012 08:24:25 +0000 (10:24 +0200)]
Move test helper function to separate header file

Makes it possible to use the collectGarbage_helper function in other
autotests too (e.g., tst_qscriptextqobject).

Change-Id: I4fefa36aba13ebf9f931f0e2b90d7ddbc0036a6c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoAdd qtscriptglobal.h for the qtscript.git module EXPORT macros
Thiago Macieira [Thu, 7 Jun 2012 12:52:56 +0000 (14:52 +0200)]
Add qtscriptglobal.h for the qtscript.git module EXPORT macros

No library other than the core libraries should depend on their
export macros being in qglobal.h.

Change-Id: I6ded70813f6296ca5aa1d7d3cdb38503a5538424
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoQScriptEngine::pushContext(): Don't inherit parent context's scope
Kent Hansen [Tue, 7 Aug 2012 08:44:46 +0000 (10:44 +0200)]
QScriptEngine::pushContext(): Don't inherit parent context's scope

This was a regression introduced in Qt 4.6 (JavaScriptCore-based
backend). pushContext() should always create a context with a "clean"
scope (only the Global Object and the context's own activation object
should be in the scope chain).

The scope chain API is internal, but the wrong behavior could still
be observed e.g. through QScriptEngine::evaluate().

Task-number: QTBUG-18188
Change-Id: I138dabc665d7275fb85d3b5e1b473d56096a989e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFix JIT crash on x86-64 (avoid 32-bit branch offset overflow)
Kent Hansen [Thu, 8 Jul 2010 17:26:50 +0000 (17:26 +0000)]
Fix JIT crash on x86-64 (avoid 32-bit branch offset overflow)

Cherry-picked from webkit commit

Task-number: QTBUG-23871
Change-Id: Ia028fe072b349e3a7883ae0f6f7298941cc1bc9e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
6 years agoSet the Qt API level to compatibility mode in all tests.
Thiago Macieira [Wed, 1 Aug 2012 11:56:22 +0000 (13:56 +0200)]
Set the Qt API level to compatibility mode in all tests.

Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I432719e9520662c9dda5eaa580f0b508de4120fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFixed compile without QtWidgets, unify "is module available?" syntax
Rohan McGovern [Sun, 29 Jul 2012 23:59:24 +0000 (09:59 +1000)]
Fixed compile without QtWidgets, unify "is module available?" syntax

If QtWidgets is not available, disable a few examples which need it.

Standardize on isEmpty(QT.widgets.name) in preference to

Change-Id: I00335149a75911dd4ab42a4ce659889d548a8be3
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
6 years agoTest that the package configs for QtScript work.
Stephen Kelly [Sat, 23 Jun 2012 09:41:26 +0000 (11:41 +0200)]
Test that the package configs for QtScript work.

Change-Id: I044409a384a1931c7727cc679fb54a87be627a45
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoFix QScriptContextInfo::functionMetaIndex() for overloaded slots
Kent Hansen [Fri, 13 Jul 2012 11:15:09 +0000 (13:15 +0200)]
Fix QScriptContextInfo::functionMetaIndex() for overloaded slots

This was a regression against the pre-JavaScriptCore
implementation, where we used to store the selected method index as
an internal member of the QScriptContext(Private). But in the
JSC-based implementation, QScriptContext is implemented as a
pointer to a JSC::CallFrame, and there are no unused fields in
CallFrame where the method index can be stashed.

Refactor the Qt method call logic so that the method selection is
separate from the actual processing of the target method. This way,
QScriptContextInfo can compute the method index the same way that
the actual method call did.

Task-number: QTBUG-6133
Change-Id: I619fa8b91542d0b6ab5a44b00266cc0705c95823
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoCheck that property descriptor members are valid before using them
Kent Hansen [Mon, 9 Jul 2012 18:36:22 +0000 (20:36 +0200)]
Check that property descriptor members are valid before using them

Even if getPropertyDescriptor() returns true, it's not guaranteed
that PropertyDescriptor::setter() or PropertyDescriptor::value()
returns a valid JSC value.

This code is in an "#ifdef QT_BUILD_SCRIPT_LIB" block, i.e. a
patch we added on top of the original JSC sources.

The lack of checks caused the getter-in-prototype and
indexed-accessors tests from the V8 test suite to assert in
debug mode.

Task-number: QTBUG-17915
Change-Id: I568d83f2f80b28871ea0d934a8e33078ac8aa3ad
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agouse centralized handling of QT_BUILD_PARTS
Oswald Buddenhagen [Tue, 3 Jul 2012 19:41:18 +0000 (21:41 +0200)]
use centralized handling of QT_BUILD_PARTS

Change-Id: Iab5e01b2254bbf826551c3f4c8309d303d314136
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoEnsure QObject wrappers are garbage-collected if appropriate
Kent Hansen [Thu, 28 Jun 2012 13:29:22 +0000 (15:29 +0200)]
Ensure QObject wrappers are garbage-collected if appropriate

Address the "###" comment.
When QScriptEngine::newQObject() is called with the option
PreferExistingWrapperObject, the resulting wrapper object is cached
by the engine, in case it will be needed later (e.g., by a subsequent
newQObject() call for the same QObject, with the same wrap options).

But if a QObject wrapper object is only referenced by the QtScript
internals (i.e., not reachable from the JSC stack/heap, or kept in a
QScriptValue), the wrapper should not be kept alive if the ownership
is ScriptOwnership, or if the ownership is AutoOwnership and the C++
object has no parent.

If the wrapper is marked in that case, it won't get collected, and
hence the C++ object will be kept alive, too. In practice, QtScript
appears to leak memory (the objects will only be destroyed when the
engine is destroyed).

Our copy of JSC doesn't have a concept of weak references; the
ClientData callback in the JSC markRoots() function (which causes
QScriptEnginePrivate::mark() to be called) was moved to the end. This
enables the wrapper and connection marking logic to determine whether
a wrapper can be safely discarded (if it hasn't been marked by JSC by
this point, it must be a weak reference).

Task-number: QTBUG-21993
Change-Id: I61f6aafc91f080b80d3f5859148e645b80d9b653
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoUse the new function QMetaMethod::name() instead of methodSignature()
Kent Hansen [Fri, 29 Jun 2012 11:34:47 +0000 (13:34 +0200)]
Use the new function QMetaMethod::name() instead of methodSignature()

Calling methodSignature() is inefficient in Qt5 because it
dynamically constructs a string. In the places where we only want the
method name, we should call QMetaMethod::name() instead.

Change-Id: Ie2e66945a3a275630aad1c9253bd60b9889b7cfd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agodoc: add a few missing properties to the ECMAScript reference
Kent Hansen [Fri, 29 Jun 2012 11:07:32 +0000 (13:07 +0200)]
doc: add a few missing properties to the ECMAScript reference

Task-number: QTBUG-15213

Change-Id: I6618cbde2032d6ced780057930f43fa967087262
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agodoc: remove wrong information about Error object stack property
Kent Hansen [Fri, 29 Jun 2012 08:37:11 +0000 (10:37 +0200)]
doc: remove wrong information about Error object stack property

Since the switch to JavaScriptCore, Error objects no longer have the
non-standard "stack" property, and we're not going to hack
JavaScriptCore to support it.

Task-number: QTBUG-15956
Change-Id: I085f24fbb179bbf3d1609cbc13e963fa51b4dbbc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agocalculator example: increase maximum length of result display
Kent Hansen [Thu, 28 Jun 2012 09:46:54 +0000 (11:46 +0200)]
calculator example: increase maximum length of result display

15 characters isn't enough to hold results like
1.1760477643322587e-7. Instead it would get chopped down to

Task-number: QTBUG-20845
Change-Id: I9ea697ec627caa5225b84208bdf1e6ac0be59ebb
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoDon't crash if queued signal handler no longer exists
Kent Hansen [Mon, 25 Jun 2012 13:46:36 +0000 (15:46 +0200)]
Don't crash if queued signal handler no longer exists

Task-number: QTBUG-26261

Change-Id: Ie269c56c0336b1c937d4ec551f913ae7537d0338
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agobuild system cleanups
Oswald Buddenhagen [Thu, 12 Apr 2012 10:32:45 +0000 (12:32 +0200)]
build system cleanups

- load(qt_module) => load(qt_build_config)
- remove:
  - CONFIG+=module (obsolete)
  - setup of PKGCONFIG* variables (automated now)
  - code relating to module version headers (automated now)
  - %mastercontent assignment (automated now)
  - QT_BUILD_*_LIB defines (automated now)
  - pointless QPRO_PWD assignments
  - qmake -project boilerplate

Change-Id: I618bc1db930a372e7f713f21f21b2cfedc839258
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoauto-generate module pris
Oswald Buddenhagen [Thu, 12 Apr 2012 09:14:48 +0000 (11:14 +0200)]
auto-generate module pris

Change-Id: I060145658caaa4b4d39c323c6004e594ff44f98f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoCompile with clang's libc++
Bradley T. Hughes [Wed, 30 May 2012 09:49:40 +0000 (11:49 +0200)]
Compile with clang's libc++

An overload for std::swap() what works with std::pair<A,B> is included
in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by
omitting the version there and using the std::swap() version.

Collector.cpp needs to include pthread.h directly, as it is not
automatically included by libc++'s headers (libstdc++ does pull in
pthread.h though).

Change-Id: I20ffe5a745900d1cfa1e489ebf4376e454eded5f
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
6 years agoFix namespace compilation on macx clang developer build OSX 10.7
Toby Tomkins [Tue, 12 Jun 2012 06:39:25 +0000 (16:39 +1000)]
Fix namespace compilation on macx clang developer build OSX 10.7

Change-Id: Ic111b51472e0252446be4c2db0f991aac1c72e1d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoFix possible type collision with ICU
Konstantin Ritt [Thu, 14 Jun 2012 23:39:05 +0000 (02:39 +0300)]
Fix possible type collision with ICU

see https://bugs.gentoo.org/show_bug.cgi?id=407315

The UChar32 is declared as signed 32-bit int since ICU 2.4,
no chance they'll fix their code.

Change-Id: I9691507c8ca14a04610e9b13ae13f416929ffa08
Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
6 years agoSkip a test case that started failing after the upgrade to Unicode 6.1
Konstantin Ritt [Thu, 14 Jun 2012 23:31:42 +0000 (02:31 +0300)]
Skip a test case that started failing after the upgrade to Unicode 6.1

U+10C1 and U+10CD has been added in the Unicode 6.1 and assigned with
general category Lu (Uppercase Letter). toLower(Lu) can never be Lu,
thus the failing testcases are just wrong -> omit them.

This also avoids using of QUnicodeTables internals in JSC.

Change-Id: I6aa6dab686dc3e3556ebe83c395c5d93e42cfb4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
6 years agoSkip a test case that started failing after the upgrade to Unicode 6.1
Lars Knoll [Wed, 13 Jun 2012 14:24:13 +0000 (16:24 +0200)]
Skip a test case that started failing after the upgrade to Unicode 6.1

Change-Id: I6aa6dab686dc3e3556ebe83c395c5d93e42cfb4c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoDisable these tests for now
Lars Knoll [Wed, 13 Jun 2012 15:22:40 +0000 (17:22 +0200)]
Disable these tests for now

They cause valgrind errors and crashes and it's unclear how
they are at all related to QtScript

Change-Id: I0bf1d6b047e0770d965a174cd66bfb3d7cad4ac3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoDon't build scripttools when Qt is configured with -no-widgets
Kent Hansen [Tue, 5 Jun 2012 08:04:29 +0000 (10:04 +0200)]
Don't build scripttools when Qt is configured with -no-widgets

Change-Id: I9fabf055a959b27cd44fb2e179f98bfae9d7d297
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agodon't reference $$QT_SOURCE/BUILD_TREE - they're unavailable here
Oswald Buddenhagen [Mon, 21 May 2012 10:09:24 +0000 (12:09 +0200)]
don't reference $$QT_SOURCE/BUILD_TREE - they're unavailable here

Change-Id: I88316acb4cfc867689dfa636dd7554ac0976275f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
6 years agoDoc: Modularize QtScript documentation.
Casper van Donderen [Tue, 5 Jun 2012 10:51:07 +0000 (12:51 +0200)]
Doc: Modularize QtScript documentation.

Change-Id: I042d9bafe4f48a8cd23306f0864b6872776d0153
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoDisable C++11 support when building QtScript
Bradley T. Hughes [Tue, 29 May 2012 08:36:35 +0000 (10:36 +0200)]
Disable C++11 support when building QtScript

As the existing comment shows, the WebKit code cannot be built with
C++11 support enabled.

Change-Id: Ic900fb1dc73420fcc3fcec9e7d574f7dece0e036
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoFix crash when converting invalid JSValue to string
Kent Hansen [Fri, 1 Jun 2012 19:05:31 +0000 (21:05 +0200)]
Fix crash when converting invalid JSValue to string

JSC::JSValue::toString() expects that the input is valid.

Task-number: QTBUG-21896
Change-Id: I3199fcba94be5426cb3d193b57d16176daae83a0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFix crash when accessing QObject properties through activation object
Kent Hansen [Fri, 1 Jun 2012 18:27:05 +0000 (20:27 +0200)]
Fix crash when accessing QObject properties through activation object

Since objects in the scope chain have to be JSActivationObjects,
QScriptContext::setActivationObject() creates a proxy object that
should delegate access to the actual object.

This case was not handled in the toQObject() conversion function, so
for activation property access through evaluation (where the
this-object would be the proxy object, not the actual QObject), the
this-object conversion to QObject would fail, and the assert
"this-object must be a QObject" was triggered.

Task-number: QTBUG-21760
Change-Id: I40e868d9717ec76e0df18d5848c6ad99546ba34f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFix scripttools compilation when some features are disabled
Kent Hansen [Fri, 1 Jun 2012 13:52:21 +0000 (15:52 +0200)]
Fix scripttools compilation when some features are disabled

Task-number: QTBUG-20378

Change-Id: Ia1dc574824cb1d58c237d60675d1b8a5f8f44c43
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoDon't crash in debugger if QScriptEngine is deleted
Kent Hansen [Fri, 1 Jun 2012 13:16:01 +0000 (15:16 +0200)]
Don't crash in debugger if QScriptEngine is deleted

Task-number: QTBUG-21548

Change-Id: I925a920c8685cf4cf40c7ad03c2d519e2f2121fb
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoRemove trailing semi-colon
Kent Hansen [Thu, 31 May 2012 12:43:53 +0000 (14:43 +0200)]
Remove trailing semi-colon

Task-number: QTBUG-22152

Change-Id: Iad9f14ea4bbe401091aa5c56f8ce7abf0e69af8b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoAdd missing staticMetaObject member initialization
Kent Hansen [Thu, 10 May 2012 14:00:58 +0000 (16:00 +0200)]
Add missing staticMetaObject member initialization

Change-Id: Ia10e82a896eb40a7af8045cb120e3fc4afd88a02
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFix race condition in tst_qsharedmemory autotest
Kent Hansen [Fri, 25 May 2012 11:59:23 +0000 (13:59 +0200)]
Fix race condition in tst_qsharedmemory autotest

Task-number: QTBUG-25655

Change-Id: I9d0c1498decfe94a84b3ddaba566eac92066e14d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
6 years agoDeprecate the Encoding argument of qsTranslate
Lars Knoll [Thu, 17 May 2012 14:40:14 +0000 (16:40 +0200)]
Deprecate the Encoding argument of qsTranslate

This is the same as change 4822a821facbbf834c6aab5a8a7da2b3e43f09f7
in qtdeclarative. We always assume the js source code is
Utf8 encoded, as also on the C++ side.

Change-Id: I4f49484241718dfc4a2bb39a674b54df46aa8c8d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoSimplify QVariant::convert and QVariant::canConvert calls.
Jędrzej Nowacki [Fri, 18 May 2012 15:38:44 +0000 (17:38 +0200)]
Simplify QVariant::convert and QVariant::canConvert calls.

QVariant::Type casts are not necessary in Qt5.

Change-Id: I43833e869379db8937839612dfb6162f878870cb
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoqMalloc, qFree and qRealloc are deprecated.
Debao Zhang [Fri, 27 Apr 2012 08:53:37 +0000 (01:53 -0700)]
qMalloc, qFree and qRealloc are deprecated.

Use the stdlib version directly instead

Change-Id: Ib289b37c9a00b7da1926e20cc1c1b5a52388fb2f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoUpdate the includes after QIcon was moved back to QtGui
Olivier Goffart [Wed, 16 May 2012 16:39:55 +0000 (18:39 +0200)]
Update the includes after QIcon was moved back to QtGui

Change-Id: I203a7c48f2280b22a8b224a82a07c29ffbae3c78
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoSkip tst_QScriptEngine::collectGarbage
Olivier Goffart [Sun, 20 May 2012 01:24:07 +0000 (03:24 +0200)]
Skip tst_QScriptEngine::collectGarbage

This test is blocking CI.
It is possible that depending on the optimisation flags, some pointers
are still on the stack.

This feature is also tested in

Change-Id: I264f634aa58a002738b8d9c87c43ee1790bb329a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
6 years agoRemove the test generator for the test qscriptvaluegenerated.
Friedemann Kleint [Thu, 10 May 2012 12:21:56 +0000 (14:21 +0200)]
Remove the test generator for the test qscriptvaluegenerated.

The data will not be re-generated any more since the module is

See also 58f53b807fafcadf76282f0c8c7f20451c7a97a5.

Change-Id: Ida365dbb2e0a70b1cf7d5f0714e5df4cc7084d30
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoFixed MSVC2011 build
Andreas Holzammer [Mon, 14 May 2012 06:37:25 +0000 (08:37 +0200)]
Fixed MSVC2011 build

JavaScriptCore fix is relevant to changed ctor of the std::pair in
C++11. Due to that change some code has been broken. Fix makes using
std::pair compliant to both standards

Change-Id: I77a1fe4b137480b51c24267b7aacb5b688dbddb3
(Partially cherry picked from commit 9a06d491e8e63293e4cc877b00f3a59188283785)
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Kervala <kervala@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoDoc: Fix \sa usage
Marius Storm-Olsen [Thu, 10 May 2012 11:56:11 +0000 (13:56 +0200)]
Doc: Fix \sa usage

Ensure comma between elements (1 missing), single space and curly-
braces around title elements, etc.

Change-Id: I0c8e0f0a8ca2cd942fa69424440eeec3ae88af27
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
6 years agoRevert "JSCore build fix for WEC7"
Andreas Holzammer [Mon, 7 May 2012 13:51:00 +0000 (15:51 +0200)]
Revert "JSCore build fix for WEC7"

It's reverted, as there seems to be at least two
implementations of the stl in WEC7. One for each BSP SDK
and one shipped with the compiler, which is in this
case Visual Studio 2008. The Compiler has a stl with std::min
etc. Visual Studio GUI also uses the compiler version of
the stl first. It seems to be that the environment was
setup wrongly. Checksdk also uses the right order.

This reverts commit 8b65d84145f0f415d0963caa7b49da07ac67148d.

Change-Id: Ic00d87777e822d9a7c2ee16ce60cad3782293245
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoRemove large, static QString[] arrays from test qscriptvaluegenerated.
Friedemann Kleint [Thu, 10 May 2012 09:26:05 +0000 (11:26 +0200)]
Remove large, static QString[] arrays from test qscriptvaluegenerated.

They seems to trigger a compiler error for linux-arm-gnueabi-g++

Use const char *-arrays and introduce utility functions
to populate the static hashes, sets. Fix some string and iterator
usage errors.

Change-Id: I4e32c6ffa004e141bc04c3a2971c379f71072b38
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoChange uses of {to,from}Ascii to {to,from}Latin1
Thiago Macieira [Thu, 3 May 2012 12:19:19 +0000 (14:19 +0200)]
Change uses of {to,from}Ascii to {to,from}Latin1

This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I4f44512856ea99112d8eb6d341d6058c1fc439dc
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoPort qtscript to QMetaMethod-based connectNotify()
Kent Hansen [Thu, 26 Apr 2012 08:43:07 +0000 (10:43 +0200)]
Port qtscript to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Also improve the autotest so we check precisely the number of
connect/disconnect notifications received.

The hacks to manually call the notify functions aren't needed
anymore, because the internal QMetaObject::(dis)connect() now does
it for us.

Change-Id: I2e5efed34ee1cba0aad8e60ea00dc9bc2a25bc6c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
6 years agoFix some deprecation warnings in QtScript.
Friedemann Kleint [Mon, 30 Apr 2012 12:54:56 +0000 (14:54 +0200)]
Fix some deprecation warnings in QtScript.

Change-Id: I98d4826fcc2e3687d45edfccca956891ca0466cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
6 years agoFixed compile for removal of const from QRegExp::indexIn
Rohan McGovern [Mon, 30 Apr 2012 00:18:59 +0000 (10:18 +1000)]
Fixed compile for removal of const from QRegExp::indexIn

Task-number: QTBUG-25064
Change-Id: I8adfe68a610a37b667803939553739d64a714c51
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
6 years agoRemove insignification from qscriptjstestsuite test.
Jason McDonald [Tue, 24 Apr 2012 10:12:14 +0000 (20:12 +1000)]
Remove insignification from qscriptjstestsuite test.

This test has not failed on Windows since CI testing on that platform

Task-number: QTBUG-24426
Change-Id: I0cafb1bcf94fbd96d81bb4075e045ff434f58d28
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoRemove insignification from qscriptv8testsuite test.
Jason McDonald [Tue, 24 Apr 2012 10:22:14 +0000 (20:22 +1000)]
Remove insignification from qscriptv8testsuite test.

This test has not failed on Windows since CI testing on that platform

Task-number: QTBUG-24427
Change-Id: I955eeb23b954d46b3b9170cd58fdc77493ab3476
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoAddapt QtScript to the new moc output
Olivier Goffart [Tue, 17 Apr 2012 18:04:31 +0000 (20:04 +0200)]
Addapt QtScript to the new moc output

As changed by change If0b8f586cbaf633eed10045adee3ba3366826c86 in

Change-Id: If6556f75451c6a2c7e78b7987dc713d1b9b30179
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoDon't use the QRegExp methods that modify the object
Thiago Macieira [Mon, 23 Apr 2012 14:03:10 +0000 (16:03 +0200)]
Don't use the QRegExp methods that modify the object

QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I4f57d8df2e4de13aa95bb72da53c2565b38ae616
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoJSCore build fix for WEC7
Janne Anttila [Wed, 24 Aug 2011 05:54:41 +0000 (08:54 +0300)]
JSCore build fix for WEC7

WEC7 does not have std::ptrdiff_t type and std::min/std::max,
introduced the missing types and functions in JSCore platform.h

Task-number: QTBUG-22497
Change-Id: I0bf2bff2a80bdff36253f233b30cc95e1c772e23
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
(cherry picked from commit 7f8612853273f9dc120a7bc096f10821eb48fd2b)

6 years agoWEC7 build fix - use ptrdiff_t from std namespace.
Janne Anttila [Fri, 18 Nov 2011 09:44:46 +0000 (11:44 +0200)]
WEC7 build fix - use ptrdiff_t from std namespace.

WEC7 does not have ptrdiff_t outside std namespace, switched to use
ptrdiff_t from std namespace correspondingly as OwnArrayPtr.h does in

Task-number: QTBUG-22502
Change-Id: I5c2ffd271cccd12c1fcdca3975ace3e8224e00bf
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
(cherry picked from commit 9912af2108398b8633f91300c455455f6e16e482)

6 years agoFixes to JSCore for WinCE.
Janne Anttila [Wed, 24 Aug 2011 09:49:48 +0000 (12:49 +0300)]
Fixes to JSCore for WinCE.

Moved WINCE specific code before desktop windows code. This is needed because
in WinCE both OS(WINCE) and OS(WINDOWS) are true.

Task-number: QTBUG-22502
Change-Id: Icf9ad1a155dc705e37e5e057bb23bc7f5c2d4931
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
(cherry picked from commit e93c5aae8366d430d69827d409f3b6d31eb5dfb6)
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
6 years agoUpdate implementation of callQtMethod after QMetaType::UnknownType introduction
Jędrzej Nowacki [Thu, 29 Mar 2012 14:48:32 +0000 (16:48 +0200)]
Update implementation of callQtMethod after QMetaType::UnknownType introduction

This patch gets rid of qWarning caused by misuse of QVariant.

Change-Id: I889bd3830d86ea6d69db7a7ddb160a1f4da0c9bd
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
6 years agoAdd missing case in QScriptEnginePrivate::create
Jędrzej Nowacki [Wed, 7 Mar 2012 16:05:21 +0000 (17:05 +0100)]
Add missing case in QScriptEnginePrivate::create

Currently QMetaType::UnknownType, instead of QMetaType::Void, is used
to check if a type id is valid or not.

Change-Id: Ib185e3f28ef675c57d9b8b0d2eb4e4f124999131
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
6 years agoUpdate QObjectConnectionManager to meta-object revision 7
Kent Hansen [Wed, 22 Feb 2012 09:56:10 +0000 (10:56 +0100)]
Update QObjectConnectionManager to meta-object revision 7

Regenerate the moc output so that it's in sync with the latest moc.

Change-Id: I61790556eda2f5e0fc6f9a21c32e068bcb912c56
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoAdapt qtscript to QMetaMethod::signature() renaming
Kent Hansen [Tue, 21 Feb 2012 12:06:35 +0000 (13:06 +0100)]
Adapt qtscript to QMetaMethod::signature() renaming

QMetaMethod::methodSignature() should be used instead, and it returns
a QByteArray.

Change-Id: I81150e238dab7eda26d0466ac407a4f3ba79a7c7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
6 years agoFix the build with gcc 4.7.
Andras Becsi [Tue, 10 Apr 2012 17:20:32 +0000 (19:20 +0200)]
Fix the build with gcc 4.7.

The dependent base class of nested classes has to be fully qualified.

Change-Id: If166ad3578fd65ea84899da65d2b85283dbcca9d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoList only the QtCore module in the QScriptTools depends. qt-v5.0.0-alpha1
Stephen Kelly [Tue, 20 Mar 2012 18:02:01 +0000 (19:02 +0100)]
List only the QtCore module in the QScriptTools depends.

The others do not appear in its public interface.

Change-Id: I70f676123f235b8859f4cec91c4902b441f506c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
6 years agoDisable qtscriptengineagent autotest for non-developer builds
Kai Koehne [Thu, 15 Mar 2012 12:47:34 +0000 (13:47 +0100)]
Disable qtscriptengineagent autotest for non-developer builds

It uses qt_script_isJITEnabled , which is only exported with

Change-Id: I1c3d69c82896b8b940b5913629b68227a66f9815
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoMake QScriptValue QObject handling consistent.
Stephen Kelly [Tue, 6 Mar 2012 10:13:09 +0000 (11:13 +0100)]
Make QScriptValue QObject handling consistent.

The behaviour has been inconsistent
since ae85d7c965e7d50404c056a77c73bfe00267fa12 in qtbase
which added special handling of QObjects to QVariant.

Change-Id: Ie75faa3cc3387cff8894cdba025c93f2cc2ea491
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoFix compilation, use DefaultCodec.
Friedemann Kleint [Tue, 6 Mar 2012 09:23:21 +0000 (10:23 +0100)]
Fix compilation, use DefaultCodec.

Change-Id: I0d1036eb75de9fcd2663ec5476d3b13edb2e264e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoRemove the usage of deprecated qdoc macros.
Casper van Donderen [Thu, 1 Mar 2012 18:11:09 +0000 (19:11 +0100)]
Remove the usage of deprecated qdoc macros.

QDoc now has support for Doxygen style commands for italics, bold
and list items. This change applies that change in QDoc to the
actual documentation.

Task-number: QTBUG-24578
Change-Id: I7733d18ce1e3459ef618802060d176c9211d3d5f
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoRemove use of QT_ASCII_CAST_WARN_CONSTRUCTOR.
Stephen Kelly [Wed, 22 Feb 2012 23:33:19 +0000 (00:33 +0100)]

Fixes build after I0b4df4c99600cacbaafbf0bc4270cd4978600956

Change-Id: If85e4ee8c2fd43baa24cf8608ad2f81ea112ae7c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoUse new plugin system in QtScript.
Friedemann Kleint [Thu, 23 Feb 2012 10:38:08 +0000 (11:38 +0100)]
Use new plugin system in QtScript.

Add static plugin test and QtDBusScriptPlugin
which were left over (see

Change-Id: Ifd1e13882f7e39ce724a6e94732b238255ce3128
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoWindows: Mark two failing QtScript tests insignificant
Miikka Heikkinen [Tue, 21 Feb 2012 15:07:03 +0000 (17:07 +0200)]
Windows: Mark two failing QtScript tests insignificant

Once underlying issues are fixed, the tests need to be re-enabled.
Task-number: QTBUG-24203

Change-Id: I38449fd3753f647abaaab24f8928d28fd921cdcb
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoPort QtScript autotests to QMetaObjectBuilder
Kent Hansen [Mon, 20 Feb 2012 20:27:11 +0000 (21:27 +0100)]
Port QtScript autotests to QMetaObjectBuilder

The tests were using a custom meta-object builder that generated
meta-objects of an old revision. Kill the custom builder and use
QMOB instead.

Change-Id: I4eeb6f08474f780dead13fc1a9e3605b93973672
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoUpdate QObjectConnectionManager meta-object to revision 6
Kent Hansen [Mon, 20 Feb 2012 20:59:59 +0000 (21:59 +0100)]
Update QObjectConnectionManager meta-object to revision 6

Support for old meta-object revisions will be removed in Qt 5.

This commit brings the QObjectConnectionManager meta-object in
sync with current moc output.

Change-Id: Iaee8bf68cc9d0568092f7692b3422145fed91c93
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
6 years agoFix link for QObject integration documentation in QScriptEngine
Teemu Katajisto [Tue, 21 Feb 2012 09:50:57 +0000 (11:50 +0200)]
Fix link for QObject integration documentation in QScriptEngine

Picked from 4.8 commit 3826203f744a2147bebf5f088de0d524156f59fd

Task-number: QTBUG-8323

Change-Id: I360f7592cb6a0906ab7bf402963109b7aa1edebe
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
6 years agoRemove solaris-g++ SPARC workaround
Bradley T. Hughes [Tue, 14 Feb 2012 13:36:33 +0000 (14:36 +0100)]
Remove solaris-g++ SPARC workaround

It is unclear when or why this was added. We will re-add this in the
future if testing reveals the need.

Change-Id: I3a0cabe5489dc0f6602c8d771978c90887cff69e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
6 years agoCompile windows
Jan-Arve Saether [Mon, 20 Feb 2012 12:23:45 +0000 (13:23 +0100)]
Compile windows

Change-Id: I5adabccb85738f16a13f725ade7fa0e17d565b1e
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoUse new plugins system in Qt Script.
Friedemann Kleint [Fri, 17 Feb 2012 11:49:33 +0000 (12:49 +0100)]
Use new plugins system in Qt Script.

Change-Id: Ie28cc00899abaa3f42a0f43ed199e3c14d45df3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoFixed tst_QScriptValue::toQObject for new QVariant cast behavior
Rohan McGovern [Thu, 9 Feb 2012 03:48:02 +0000 (13:48 +1000)]
Fixed tst_QScriptValue::toQObject for new QVariant cast behavior

ae85d7c965e7d50404c056a77c73bfe00267fa12 in qtbase allows QObject
derived types to be extracted from a QVariant by value<QObject*>(),
which was previously not possible.  The change also applies to
qscriptvalue_cast, so update this test for the new expected behavior.

Note that the behavior of QScriptValue::toQObject has not been updated,
which means the result of v.toQObject() vs
qscriptvalue_cast<QObject*>(v) on the same QScriptValue may now give
different results.

Change-Id: I70007002dc89d094d76754e58cc9042b4b4f0f67
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoFixed compile of customclass example
Rohan McGovern [Thu, 9 Feb 2012 02:33:14 +0000 (12:33 +1000)]
Fixed compile of customclass example

Add a missing forward declaration and include.

Add a missing Q_OBJECT (mandatory since qtbase

Change-Id: I6a4e73e5eba0d02d02246c8eb9662ec04f037a6c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
6 years agoFix compilation on QNX.
Sean Harmer [Mon, 6 Feb 2012 10:04:23 +0000 (10:04 +0000)]
Fix compilation on QNX.

Cherry picked commit 144de35b8c770d6698e1e6a11a37cbcc24ca4e8b from Qt

Change-Id: I6880436b54cc1c8ab6ecb64727316f422dcf5ee8
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoBuild fix for Windows.
Friedemann Kleint [Mon, 6 Feb 2012 08:47:48 +0000 (09:47 +0100)]
Build fix for Windows.

Deactivate min, max macros in windows.h

Change-Id: Ie045b6b278fa788d55eb8a3dbefb7fab6edb5934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoRemove "All rights reserved" line from license headers.
Jason McDonald [Tue, 24 Jan 2012 05:09:08 +0000 (15:09 +1000)]
Remove "All rights reserved" line from license headers.

As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I752b02a8155143626d22bd86082177550bd1cfb4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoUpdate obsolete contact address.
Jason McDonald [Fri, 20 Jan 2012 05:03:18 +0000 (15:03 +1000)]
Update obsolete contact address.

Replace Nokia contact email address with Qt Project website.

Change-Id: I6597406c8041227410e672b86a567e1161a0ab59
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoRemove the use of QT_MODULE()
Gunnar Sletta [Mon, 9 Jan 2012 08:03:25 +0000 (09:03 +0100)]
Remove the use of QT_MODULE()

Change-Id: Ie234485162d162935e96adec388361b771342c86
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
6 years agoUse QFINDTESTDATA in tst_qscriptextensionplugin.
Friedemann Kleint [Fri, 13 Jan 2012 14:15:24 +0000 (15:15 +0100)]
Use QFINDTESTDATA in tst_qscriptextensionplugin.

Find plugins on Windows as well.

Change-Id: I013cc74299a6d476d8d5f9554cdee71d4092b4ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoImprove tst_qscriptextqobject.
Friedemann Kleint [Mon, 9 Jan 2012 09:07:00 +0000 (10:07 +0100)]
Improve tst_qscriptextqobject.

- Improve test to output more information on failure reasons should
  further signals, slots, properties be added.

Change-Id: I1a6df8c0689a1082037d43a1d8ddea2d44bbe5ef
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoBypass autotests that currently fail on Ubuntu 11.10 x64.
Toby Tomkins [Tue, 10 Jan 2012 05:33:05 +0000 (15:33 +1000)]
Bypass autotests that currently fail on Ubuntu 11.10 x64.

These tests currently do not pass the CI system. They are bypassed with
an associated QTBUG assigned to fix them. Bypassing allows the modules
tests to be flagged as enforcing.

Task-number: QTBUG-23463

Change-Id: I8ef665b5a62426b6d1cc3b4952a9cc4e4136c2a4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoFix Qt IPC-test on Windows.
Friedemann Kleint [Mon, 9 Jan 2012 11:51:13 +0000 (12:51 +0100)]
Fix Qt IPC-test on Windows.

- Introduce base class for tests using the lackey executable
  that locates the binary and the scripts and provides
  convenience functions for error handling and creating
- Simplify .pro files accordingly, make all binaries
  command line applications (remove QtGui and Mac bundles)
- Use absolute paths for scripts and executable.
- Remove Windows CE code.
- Introduce QTemporaryDir to tst_qsystemsemaphore
  and create scripts there instead of creating
  many temporary files.

Acked-by: Jo Asplin <jo.asplin@nokia.com>
Change-Id: I26dcda98c2372705d19bcb586b8e36cdccebcd41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoImprove handling of QScriptEngine::ExcludeDeleteLater.
Friedemann Kleint [Mon, 9 Jan 2012 09:05:05 +0000 (10:05 +0100)]
Improve handling of QScriptEngine::ExcludeDeleteLater.

Determine index dynamically instead of using a hard-coded index
in case should further methods be added.

Change-Id: I8a6a3302a0034561e887ad683141a9ac17be45c8
Task-numbers: QTBUG-23502
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
6 years agoFix JS to QVariant type conversion
Kent Hansen [Mon, 9 Jan 2012 07:56:34 +0000 (08:56 +0100)]
Fix JS to QVariant type conversion

1) The special case for LastType (QVariant) should be done before
the general conversion, to avoid calling convertValue() with
targetType == -1 (which is useless and causes a qWarning).

2) moc is about to be changed to use QMetaType::QVariant instead of
QVariant::LastType to represent the QVariant type. But to keep the
CI happy in the transition period we have to check for both. The
LastType check will be removed once qtbase has been updated.

3) Get rid of the variantFromValue function in qscriptqobject. It
was identical to QScriptEnginePrivate::jscValueToVariant.

Change-Id: Ie418facc06c6c7308bc60a3ff66b9a78b109d3d3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
6 years agoFixed compile of tst_qscriptextensionplugin on some Windows configurations
Rohan McGovern [Wed, 1 Jun 2011 07:13:51 +0000 (17:13 +1000)]
Fixed compile of tst_qscriptextensionplugin on some Windows configurations

The debug and release versions of staticplugin are qmake'd with the
same destination directory.  This causes the generated staticplugin .prl
file to always refer to the debug versions of Qt libraries, even if Qt
was configured with -release.

The .prl mechanism is not useful for this test, so simply disable it to
solve the problem.

This commit is cherry-picked from Qt 4 into Qt 5.  The problem was
hidden until recently in Qt 5 due to a build system bug in qtbase, fixed
by 3225942dbb7faaeff477e137af9c3d78fcaf518e.

(cherry picked from commit f5a63feb8953799de7e787f333575ee37fae8a3f)

Change-Id: I4e88bb0944f83a101445063d59298e49f92451a2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
6 years agoUpdate copyright year in license headers.
Jason McDonald [Thu, 5 Jan 2012 05:57:20 +0000 (15:57 +1000)]
Update copyright year in license headers.

Change-Id: I323b788326712d95f6213ab8a68c18cfe28b7c76
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
6 years agoFix QScriptEngine::ExcludeDeleteLater and metaobject-related autotests
Rohan McGovern [Fri, 6 Jan 2012 03:20:38 +0000 (13:20 +1000)]
Fix QScriptEngine::ExcludeDeleteLater and metaobject-related autotests

ba635d7e74472f3a54c0c4686966af46d9035c6f in qtbase adds a signal to
QObject.  This breaks some code in QtScript which hardcoded the list of
expected metamethods on QObject, and some other code which hardcoded the
index of the deleteLater slot.  Fix it.

This is a minimal fix which does not address the underlying fragility.

Task-number: QTBUG-23502
Change-Id: Id1269f9d8af01e12587ba8ff2fecf942a7231aff
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
6 years agoFix compilation due to header changes
Sergio Ahumada [Fri, 16 Dec 2011 22:54:17 +0000 (23:54 +0100)]
Fix compilation due to header changes

- Fix QtGui => QtWidgets
- Fix QtWidgets/qstringlistmodel.h => QtCore/qstringlistmodel.h
- Fix QtWidgets/qsortfilterproxymodel.h => QtCore/qsortfilterproxymodel.h

Change-Id: I9fb584ae07b5acc79c86e1a62f7118a634e9224e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>