| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Task-number: QTBUG-13451
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| | |
armv5 complained that the call to QChar::category() was ambiguous,
because there is a version taking an uint, and a version taking ushort as
argument.
Reviewed-by: Christiaan Janssen
|
|/
|
|
| |
Reviewed-by: Martin Jones
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible that a class claims to have a property of a given name
(i.e. queryProperty() returns true), but returns an invalid value
for that property. In that case we should silently convert the value
to undefined, otherwise the value may wreak havoc in JS.
This is a regression from Qt 4.5 (pre-JavaScriptCore-based), which
had this check.
Task-number: QTBUG-15079
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The d-pointer is of type JSVariableObjectData*, but
JSVariableObjectData doesn't have a virtual destructor.
Hence we must cast the d-pointer to our subclass when deleting.
In particular, this will ensure that the destructor of the
symbolTable member is called, which will deallocate the table
storage. (For QScriptActivationObject this did not cause a leak
in practice, because its symbolTable is always empty, and JSC's
hash table uses lazy allocation.)
Task-number: QTBUG-12479
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
| |
in DeclarativeObjectDelegate::put, else we cannot get a proper
backtrace in the debugger.
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new internal JS object type,
QScriptStaticScopeObject, that enables the JS compiler to make
more aggressive optimizations of scoped property access.
QScriptStaticScopeObject registers all its properties in a
symbol table that the JS compiler has access to. If the compiler
finds the property in the symbol table, it will generate the
fast index-based op_{get,put}_scoped_var bytecodes, rather than
the dynamic (slow) op_resolve and friends.
If the compiler _doesn't_ find the property in the symbol table,
it infers that it's safe to skip the scope object when later
resolving the property, which will also improve performance
(see op_resolve_skip bytecode).
QScriptStaticScopeObject is only safe to use when all relevant
properties are known at JS compile time; that is, when a
function that has the static scope object in its scope chain is
compiled.
It's up to the user of the class (e.g. QtDeclarative) to ensure
that this constraint is not violated.
The API for constructing QScriptStaticScopeObject instances is
not public; it lives in QScriptDeclarativeClass for now, an
internal class exported for the purpose of QML. The instance is
returned as a QScriptValue and can be manipulated like any
other JS object (e.g. by QScriptValue::setProperty()).
The other part of this commit utilizes QScriptStaticScopeObject
in QtDeclarative in the two major places where it's currently
possible:
1) QML disallows adding properties to the Global Object.
Furthermore, it's not possible for QML IDs and properties to
"shadow" global variables. Hence, a QScriptStaticScopeObject
can be used to hold all the standard ECMA properties, and this
scope object can come _before_ the QML component in the scope
chain. This enables binding expressions and scripts to have
optimized (direct) access to e.g. Math.sin.
2) Imported scripts can have their properties (resulting from
variable declarations ("var" statements) and function
declarations) added to a static scope object. This enables
functions in the script to have optimized (direct) access to
the script's own properties, as well as to global properties
such as Math.
With this change, it's no longer possible to delete properties
of the Global Object, nor delete properties of an imported
script. It's a compromise we make in order to make the
optimization safe.
Task-number: QTBUG-8576
Reviewed-by: Aaron Kennedy
Reviewed-by: Olivier Goffart
Reviewed-by: Jedrzej Nowacki
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (71 commits)
Revert "Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp"
Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp
Fixing the wrong QUrl usage
When on Symbian use smaller files.
correctly position glyphs for complex languages
Removed inneccessary QGlyphLayout::offsets initialization.
Fix mirrored characters for RTL text in Symbian
QNAM: Add a code comment related to the cache
tst_QSystemSemaphore::processes fixed for WinCE
tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE
tst_qsharedmemory: create multiple instances of lackey.exe on WinCE
tst_qsharedmemory: fix deployment of lackey.exe for WinCE
fix compilation of tst_sharedmemory on Windows CE
QtScript: regression with instanceof operator for QMetaObject wrappers
examples/widgets/stylesheet fix mainwindow.ui
QStyleSheetStyle: fix memory leak on base style change
QNAM HTTP: Fixed a bug when getting empty files with pipelining
Fix window transparency on Symbian.
Tweak the 'normalGeometry' of the widget before setting it.
Use QDesktopWidget as a status pane observer on Symbian.
...
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/openvg/qpaintengine_vg.cpp
src/script/bridge/qscriptqobject_p.h
tests/auto/bic/tst_bic.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
when possible
JSC::NativeFunctionWrapper is a typedef to either JSC::PrototypeFunction or
JSC::JSFunction depending if we are running JIT or not.
When using JIT, JSC::JSFunction is faster, as it allow JIT to do the native
call dirrectly. The difference is that in that case, the JS stack is not
fully set up so we have to be carefull.
Unfortunately, it is not possible to make FunctionWrapper inherit from
JSC::NativeFunctionWrapper, because JSFunction is slightly bigger, and we
cannot fit in a Cell
Reviewed-by: Kent Hansen
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (24 commits)
qdoc: Added <div> elements to some html output for class references.
Fix compile error on mingw.
MONILITY-645
Do not override alternate background color in Plastique
Fix QComboBox ignoring foreground role in some styles
Fix compilation on HP-UXi: _SC_MONOTONIC_CLOCK isn't defined
Fix compilation with Sun CC:
Ensure that we return QPair<long,long> in all cases.
Update PLATFORM(SPARC64) to CPU(SPARC64)
jui files are no c++ ...
scan some more file types by default
Support EtchDisabledText with spin box on Windows style
QNAM HTTP: Fix invoking a method when being destructed right now
Fixed a typo in the QDoubleValidotor doc.
Trivial fix to JavaScriptCore to fix building with MSVC 2010
Autotest: oops, fix oops: remove qguard from auto.pro
Autotests: oops, remove last traces of QGuard
Remove QGuard.
Unskip test that used to crash
QtScript: Add yet more missing API shims
...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- for QScriptEngine and QScriptContext; we don't control what the
JSC functions are doing, so it's better to have shims than not to
have them (which can cause something to blow up), even if they
might not be strictly necessary as of this writing.
- for QScriptDeclarativeClass; otherwise the identifiers might
be created/destroyed in the wrong engine.
- for QScriptValueIterator destructor; otherwise the identifiers
might be destroyed in the wrong engine.
This is an attempt to fix a crash in Bauhaus, but it might still
be crashing (i.e. still some shims missing, somewhere) ;(
|
|/ /
| |
| |
| | |
Task-number: QTBUG-9205
|
| |
| |
| |
| |
| |
| | |
The signal handling bypasses the public QScriptValue API (it
calls JSC::call() directly), hence we need to insert a shim to
make sure that the correct identifier table will be used.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it possible to have a prototype object in place that
handles all slot calls, rather than having the slots be recreated
in each wrapper object.
Task-number: QTBUG-3637
Reviewed-by: Simon Hausmann
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
configure.exe
mkspecs/common/symbian/symbian.conf
src/gui/graphicsview/qgraphicswidget.h
src/gui/kernel/qapplication.cpp
src/gui/text/qtextlayout.cpp
src/openvg/qpixmapdata_vg.cpp
src/s60installs/s60installs.pro
tools/runonphone/main.cpp
tools/runonphone/serenum_unix.cpp
qtextlayout.cpp fixed up together with Eskil.
Kept the configure.exe from 4.7 without recompile.
|
| |
| |
| |
| |
| |
| |
| | |
Add missing popContext() to balance the pushContext().
Task-number: QTBUG-8364
Reviewed-by: Olivier Goffart
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
configure.exe
src/declarative/util/qdeclarativelistmodel.cpp
tools/qml/qml.pro
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't call QVector::append(). We know what the size of the vector
will be, so size it initially and work on QVector::data() directly.
Reviewed-by: Jedrzej Nowacki
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Update qscriptvalueiterator test to expect length property when
iterating arrays and strings.
- Use EvalExecutable::create() instead of EvalExecutable constructor.
The constructor is private.
- Reimplement getOwnPropertyDescriptor() in all custom script objects.
- Remove all reimplementations of getPropertyAttributes().
It doesn't exist in trunk anymore (getOwnPropertyDescriptor() is used
instead).
- Remove checkDontDelete argument from deleteProperty() reimplementations.
The purpose of this argument was to support deleting properties
with attribute Undeletable from C++. But it was quite an invasive
patch to JavaScriptCore, and it doesn't seem worth it. If this feature
is really crucial it should be re-done upstream.
One of the tests needed to be updated so it's not sensitive to the
C++ undeletability.
- Adapt getOwnPropertyNames() reimplementations to signature change.
- Add missing QScriptObject structure flags, otherwise we don't get all virtual calls.
- Remove our patch for reporting column numbers in the debugger callbacks.
It was just too intrusive. As with the checkDontDelete issue, this should
be redone upstream if it's really important. In 4.7, QScriptEngineAgent
will always report a column number of 1.
Other compilation fixes:
- InternalFunction::name() takes an ExecState* argument, not GlobalData*
- ScopeChain::globalObject is no longer a function but a member variable
- ScopeChainNode constructor takes a GlobalObject argument
- Heap::collect() is called collectAllGarbage()
- JSValue::strictEqual() takes an ExecState* argument
- Debugger::exception() takes a bool hasHandler argument
- Debugger no longer reports column number (we decided to drop that patch from JSC)
- UString doesn't have operator+=(char*)
- Update the autotests to reflect the columnNumber=1 change.
- Add helper class to avoid crashing inside JSC.
Ever since r52856 in WebKit trunk, this is needed. There are probably a lot of
other public API functions that need this guard as well, but I'll add them as they
are discovered.
- Update mkdist-javascriptcore tag, exclude a few more files.
- Set ENABLE_JSC_MULTIPLE_THREADS=0 define on Mac due to r52355 in trunk.
Reviewed-by: Simon Hausmann
|
|\ \ \
| |/ /
| | |
| | |
| | | |
Conflicts:
src/declarative/util/qdeclarativestateoperations.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's only necessary to push a QScriptContext when properties
are read from an object that inherits QScriptable.
Postpone the decision of pushing a context until we know
whether the object is a QScriptable.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The QObject binding uses the function name to determine whether
a meta-method is an overload. This was implemented quite naively
by copying the name from the signature into another array before
comparing it. This could cause several unnecessary memory
allocations, since storing the name is really only needed when
there is an exception (e.g. ambiguous call).
Instead, use strncmp to compare only the relevant characters of
the original (non-copied) method signature.
This makes normal slot invocation from QtScript up to 15% faster.
Reviewed-by: Jedrzej Nowacki
|
|/ /
| |
| |
| |
| |
| |
| | |
QML now behaves in a way similar to QtScript when it comes to QObject
ownership.
QT-2803
|
| |
| |
| |
| |
| |
| |
| | |
now that QVariant is known to QMetaType, we can test for the metatype id
instead of doing string comparison
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that QVariant is known to QMetaType, it has an ID.
This is much more robust as before. This would have fail if QVariant,
would have been registered by the user.
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This conversion needs to be as fast as possible since
it's performed every time you access a QObject property
from QtScript. Hence, we should avoid going via QString
and instead do the conversion ourselves.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's no reason to construct QScriptValues when JSC::JSValues
can be operated on directly. A benchmark showed that ~10% of the
time for reading a QObject property from a script was spent just
creating and destroying QScriptValue temporaries. It's time to
finally get rid of this potential bottleneck, not just in the
QObject integration but everywhere.
This change refactors the code so that all internal operations
are performed on JSC::JSValue (most importantly, conversion
from/to Qt types), and the public API functions are just thin
wrappers around these. E.g. instead of doing
enginePrivate->scriptValueFromJSCValue(jsValue).toQObject()
the implementation now does
QScriptEnginePrivate::toQObject(jsValue)
Other operations are delegated to the engine implementation
in similar style.
Task-number: QTBUG-8304
Reviewed-by: Jedrzej Nowacki
|
| | |
|
|\ \
| |/
| |
| |
| | |
Conflicts:
src/corelib/kernel/qobject.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
The QScriptValue does not always have a valid QScriptEngine.
|
|\ \
| | |
| | |
| | | |
into kinetic-declarativeui
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
kinetic-declarativeui
Conflicts:
bin/syncqt
src/corelib/io/qurl.cpp
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This class is essentially the same as QScriptValue, but it is faster
as it doesn't reference objects. Thus, they might be collected
if the gc runs. For return values from QScriptDeclarativeClass this
isn't a problem, of course.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QScriptDeclarativeClass.
This allows us to pass QObjects to QML-defined functions which expect
a QVariant (and will presumably help in other cases where we expect
transparent QObject <-> QVariant conversion in the engine).
Task-number: QTBUG-6178
Reviewed-by: Aaron Kennedy
|
|/
|
|
| |
Enable with QML_EXPERIMENTAL=1
|
|
|
|
|
|
|
|
|
|
| |
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
|