| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has already been fixed in 4.7 (QTBUG-9770), but the change is
too big to backport.
The general idea is the same: Only operate on UTC dates internally
(since that's how JS dates are stored), and let QDateTime take care
of converting from/to local dates as necessary.
The fix itself shouldn't be merged to 4.7, but the autotests should.
Task-number: QTBUG-9770
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
|
| |
Some functions were marked with Q_DECL_IMPORT where they should just be
Q_CORE_EXPORT. The reason is that this macro is expanded to nothing in
case of static builds whereas Q_DECL_IMPORT isn't (it is a dllimport).
That leads the linker to try to import it and it shouldn't.
Task-number: QTBUG-10791
Reviewed-by: gabi
|
|
|
|
|
|
|
|
|
|
|
| |
Tell JavaScriptCore that QMetaObject wrappers can be used as the
second operand to instanceof; this is done by setting the
ImplementsHasInstance flag.
We don't actually have to implement hasInstance() because the
default implementation does the right thing.
Task-number: QTBUG-8366
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RVCT 4 is far more strict with regards to symbol visiblity that RVCT
2.2, and will hide symbols unless all references have default visibility
in the object files. Update the various places in Qt code where the
symbol visibility was set incorrectly for DLL-based platforms (those that
use __declspec(dllimport) and (dllexport).
Note: QtWebkit and other Qt modules are fixed in different commits.
Task-number: QTBUG-9903
Reviewed-by: Jason Barron
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the JIT is enabled, as well as JIT_OPTIMIZE_NATIVE_CALL defined,
NativeFunctionWrapper is a typedef for JSFunction. This has the
consequence that the native call frame will not be fully initialized
by JIT-generated code (because it shouldn't have to); in particular,
ExecState::codeBlock() is not set up.
qsTr() relies on codeBlock() to return a sensible value, though, so
it breaks this contract.
By making qsTr a PrototypeFunction, the JIT will detect that the
function call needs more elaborate setup, i.e. initialize codeBlock()
as well.
Reviewed-by: Olivier Goffart
|
|
|
|
| |
And fix two silly typos in the error messages.
|
|
|
|
|
|
|
|
|
|
|
| |
Search up the call stack to find the first non-empty source URL.
Also and add an autotest for the QtScript translator functions
since there was none (their presence was checked, but not their
behavior...).
Task-number: QTBUG-9775
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 4.5, changing the prototype of the (custom) global object used
to "Just Work"(tm).
In the JSC-based back-end, the built-in global object acts as a
proxy if a custom global object is set, because JSC doesn't (yet,
anyway) provide a way to replace the global object.
To complicate this further, we also have a proxy to the original
global object (that bypasses the custom global object proxying (!)).
This is so that properties of the original global object can
still be accessed with the QtScript C++ API when a custom global
object has been set.
Unfortunately, JSObject::prototype()/setPrototype() are not virtual,
meaning that a change of prototype in the source object is not
reflected in the proxy or vice versa.
Work around this for now by syncing the prototype at the appropriate
places (QScriptEngine::setGlobalObject(), QScriptValue::setPrototype()).
This fixes all except the case when a prototype is set from JS,
since such a write doesn't go through our public C++ API. But this
case can be detected and handled by the global object's
JSObject::put() reimplementation. Created a separate report for that
issue: QTBUG-9737.
Task-number: QTBUG-7066
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
| |
Add missing popContext() to balance the pushContext().
Task-number: QTBUG-8364
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
|
|
|
| |
Regression against the old back-end. Don't set the translator
properties on the original global object but rather on the
active one (except for String.prototype.arg, which should
always be added to the original String constructor to match
4.5 behavior).
Task-number: QTBUG-6437
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
| |
Oops, the case of a non-array object argument wasn't implemented
nor tested in the new back-end.
This commit brings it in line with the behavior of the old back-end.
Also test that QScriptValue::construct() doesn't have the same problem.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the engine's list of free script values from growing
without bounds.
When a QScriptValue is initially not bound, its private will
be allocated from the normal heap (and not from the engine's
pool of privates, because there is no engine at this point).
But when a value is later bound (e.g. by setting it as a
property of an object, or by passing it as argument to
QScriptValue::call()) and is subsequently destroyed, its
private will be handed to the engine, which will add it to
its free-list (hence the memory is not freed). This
allocation/deallocation asymmetry causes this list go keep
growing.
The solution is to limit the size of the free-list, and free
the memory of the private immediately when the list has
reached a certain size.
Task-number: QTBUG-8400
Reviewed-by: Olivier Goffart
|
|
|
|
|
| |
Task-number: None, discovering while doing test refactoring
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to have to listen to the destroyed() signal for every
receiver object of a connection, and likewise we don't want to create
a QObject to handle each connection; instead, remove the connection
lazily at signal emission time after we've detected that the receiver
has been deleted.
Task-number: QTBUG-7313
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
| |
Make it behave the same as the old (4.5) back-end.
Reviewed-by: Jedrzej Nowacki
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (71 commits)
QNAM HTTP Code: Cache socket state inside ensureConnection()
tst_qhttpnetworkconnection: Test also HEAD in some tests
tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities
QNAM HTTP Code: When starting new request, prefer connected sockets.
typo fix
Added the 'framecapture' WebKit example to the default build.
Fix code example
fix typo in qreadwritelock's documentation
QNAM HTTP: Don't call d_func() so often
QNAM HTTP: Fix readBuffer maximum size.
QNAM HTTP: Optimize eatWhitespace()
QNAM HTTP: Check if socket already tries to connect.
network internals: fix build on S60
[syncqt] Make -separate-module work with WebKit's directory structure
doc: Corrected explanation of when append() does nothing.
doc: Added clarification about allocating space for the 0 terminator.
Add a way to access the normalised URL in QUrl.
[syncqt] Make it possible to synchronize headers for a separate module
[syncqt] Make it possible to override the base directory
network internals: start HTTP GET requests right away when called
...
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
QIODevice: Fix readAll()
Temporary hackiesh solution to prevent BOM in the xml data.
Fixed qxmlstream autotest when using shadow builds.
Attempt at readding the capital P headers for Phonon
Remove special Phonon processing from syncqt.
Use the lowercase/shortname.h headers for Phonon includes
Fixes a crash when setting focus on a widget with a focus proxy.
Update copyright year to 2010
doc: Clarified activeSubControls and subControls.
Remove warning "statement with no effect"
doc: Clarified that .lnk files are System files on Windows.
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trust Me
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
QScriptDeclarativeClass.
Task-number: QTBUG-6178
Reviewed-by: Kent Hansen
Reviewed-by: Aaron Kennedy
|
|/
|
|
|
|
|
| |
This is needed for the fix for QTBUG-5749 that follow
Reviewed-by: Kent Hansen
Task-number: QTBUG-5749
|
|
|
|
|
|
|
| |
Use the base of the file name as the translation context. (This was
the original behavior before the switch to JSC.)
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
|
| |
This reinstates the pre-4.6 behavior: A script-owned C++ object
that's not referenced anymore should be garbage collected, even
if it has connections. In order to achieve this, the "weak"
reference to the C++ object's wrapper must be invalidated.
Task-number: QTBUG-6366
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
|
| |
Rename the WTF namespace.
Task-number: http://bugreports.qt.nokia.com/browse/QTBUG-5513
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The built-in eval() function bypasses the script registration
performed by QScriptEngine::evaluate(), so if we get an
atStatement() callback from JSC from that script, the
scriptID-to-sourceProvider lookup will fail.
In this case, just return from atStatement() without delivering
the positionChange() callback to the QScriptEngineAgent, since
the agent will not have received the scriptLoad() callback for
that script anyway.
This is a change in behavior from 4.5, but we consider it
the minimum-impact fix at this point to keep 4.6.0 from
crashing. The only downside is that debugging will
effectively be "disabled" for the script passed to eval(),
but that's a lot better than crashing.
Task-number: QTBUG-6108
Reviewed-by: Jedrzej Nowacki
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is required due to the switch to the JavaScriptCore-based
back-end.
Instead of segfaulting somewhere inside JSC::initializeThreading(),
call qFatal() when this constraint has been violated.
Reviewed-by: Simon Hausmann
|
|/
|
|
| |
Over src/ tools/ examples/ and demos/
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
some changes were made to qxmlstream_p.h and script files directly;
however, those files are generated automatically by
src/corelib/xml/make-parser.sh and src/script/parser/make-parser.sh,
respectively, so the generator would overwrite the manual changes to the
files the next time it is run. This patch integrates those changes into
the generator rather than into the files directly.
Reviewed-by: Roberto Raggi
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
to the LGPL only.
To do this I ran replace-licenses.zsh $QTDIR/src/script release
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
|
| | |
| | |
| | |
| | | |
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
|
|/ /
| |
| |
| | |
Reviewed-by: alex
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QScriptDeclarativeClass is a private, but exported, class used by the
declarativeui module. It is very similar to QScriptClass, but slightly
faster and provides a couple of "backdoor" extension mechanisms used
by declarative.
Reviewed-by: Warwick Allison
|
| |
| |
| |
| | |
(cherry picked from commit d01db18696a7729b0d54af76f5224aed6750f3bb)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that simply being in the scope chain of an existant frame
isn't sufficient to be marked. This can lead to a QScriptContext
scope chain that contains a JSObject that has been collected.
For example, this code:
QScriptContext *ctxt = engine->pushContext();
ctxt.pushScope(engine->newObject());
previouslyCreatedFunctionObject.call(); // causes a GC
can lead to the object added to the scope chain to have become
invalid. This leads to hilarity later on.
Reviewed-by: Kent Hansen
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid hacking a custom toArrayIndex() in the example; instead provide
an ECMA-compliant conversion that's as fast as possible (having to
convert the QScriptString to a QString and then convert the result to
a number is considerably slower than calling JSC's
Identifier::toArrayIndex() function directly).
Reviewed-by: Olivier Goffart
|
|/
|
|
|
|
|
| |
However, there are some stuff added to qscript that I'm really not sure
about.
Reviewed-by: tom
|
|
|
|
|
|
|
|
|
|
|
| |
QScriptProgram encapsulates a Qt Script program (AKA a script).
It retains the compiled representation of the script, so that
repeated evaluation of the same script becomes faster.
An overload of QScriptEngine::evaluate() that takes a QScriptProgram
has been added.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptValue::toNumber() ~50% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
|
|
| |
Calls to engine() are mostly done for checking that the "source"
and "target" engines are the same, but we don't want those checks
to slow us down. Use an inline getEngine() function instead.
This makes e.g. QScriptValue::call() ~10% faster for a function
like "function(a, b) { return a + b; }".
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
| |
For non-object values, just return the value immediately; there is no way
that the later check (result.isObject()) will be true anyway.
This makes qScriptValueFromValue() ~50% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
| |
Makes creation+destruction of the QScriptValue a lot faster
because it uses the engine's pool of QScriptValuePrivates
instead of qMalloc()/qFree().
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
|
| |
Also avoid looking up the object's own properties twice
(before we called getOwnPropertySlot() and then getPropertySlot()
on the same object).
Makes QScriptValue::property() ~20% faster when calling it on an "empty" object.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptValue::property() ~10% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptValue::data() 15% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptValue::scriptClass() 20% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptContext::engine() 80% faster.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
| |
Makes QScriptContext::parentContext() 50% faster.
Reviewed-by: Olivier Goffart
|