| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This is a compile-error for -release -developer-build builds.
Change-Id: I7ea5363260ce35a013fbf6d1c538c763023a8dc0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
| |
Change-Id: I73efc8c568e2368bc804eacab9e8f9cced8a030b
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-35315
Change-Id: Idd35a330531722cb3d4e0d3e95cb3be6e5697688
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
| |
qqmlcomponent.cpp:112:23: error: unused function 'buildTypeNameForDebug' [-Werror,-Wunused-function]
Change-Id: I5cc82b20fee8e3f0b61ad59b831723359c8dcda4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Property access to id objects is optimized at compile time, but we cannot do
that for QQmlPropertyMap instances (or generally fully dynamic types).
This issue was a regression against Qt 5.1
Task-number: QTBUG-35906
Change-Id: I759a1a899f6a3a1f6466282f455b289ad7451086
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before blocking to wait for the thread to finish ensure the thread
itself is not waiting for the main thread to complete some action
otherwise both threads will be waiting on the same wait condition that
neither is able to wake. Likewise ensure the shutdown action is
processed if the last scheduled event is currently being processed.
Task-number: QTBUG-35581
Change-Id: I483fc56d0d398493f9fa907f3ab203439bfb9221
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlcompiler.cpp
Change-Id: I802731139d47c5b733dd805f7bf432d67d7331e1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
toUtf8 would return a temporary, and constData would hold a pointer inside that
temporary. This isn't even remotely safe. Move the pointer use down to the
initializeEngine call so it is kept around long enough for us to do our stuff.
This is a backport of cf51cdb8fb002ae3602a4c886e7c67913d77373a.
Task-number: QTBUG-35355
Task-number: QTBUG-35343
Change-Id: I338ad7f4d4137445ed9a311a293ea82bf023aafd
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 27052dcad9810869a9065da4c06e9f14379411d7.
While the additional flexibility would be nice, I've been reminded that
we already did commit to it back in July.
Change-Id: Iaf990dda98ee46eb028b4737bdeeafd050d9513f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
qCpuHasFeature also checks the compiler flags of this particular build.
If the feature was enabled by the compiler in this .cpp, then no runtime
check is performed and the test becomes an unconditional true.
Change-Id: Ibb7d333e59a0f4ed06b7d0056547177fd69658a0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 0aadcf8077840068eb182269e9ed9c31ad12f45e that pre-compiles the
expressions in PropertyChanges {} introduced a regression in where the
evaluation context was incorrect and thus bindings would not be able to
access the correct properties. For example
PropertyChanges {
target: someObject
y: height / 2
}
Here height should be looked up in the context of "someObject", not of the
PropertyChanges element.
This patch introduces an auto-test that verifies that the lookup context is
correct and fixes the bug by disabling accelerated compile time property
lookups for binding expressions that are requested from a custom parser.
Change-Id: I5cb607d07211b453ddfc9928ccbf5f9ecec85575
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old method of converting to short 8.3 name and back does
not work for drives where this is disabled.
Change-Id: Ia0a46331a31eeb61578c31ba063a80665d5fc25c
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Found by ICC 14.0:
qhashedstring.cpp(199): warning #177: function "isUnicodeNonCharacter" was declared but never referenced
Change-Id: I62b113e41197dac12f73db8347e22c825e404627
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlPropertyMap is a fully dynamic class that can add properties at any point
in time. In order for these properties to be visible inside QML, we must
disable the property cache (instead of trying to unsuccessfully re-fresh it).
What happened in this particular case is that the QQmlPropertyMap derived type
was instantiated and the VME instruction for creating it would also assign the
property cache the compiler determined. There's no way for QQmlPropertyMap
itself to access this property cache instance (stored in
output->types[id].typePropertyCache) or invalidate it, so instead don't use the
compiler's property cache when instantiating the type.
This patch also disallows the adding properties to QQmlPropertyMap when it
is used as base type for a new QML type, as we cannot provide the derived
type to the QQmlPropertyMap constructor - this is only possible in C++.
Task-number: QTBUG-35233
Change-Id: I7fa9e4a2224ccfdd7ccb3fd9f73919ecd46058a8
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| | |
toUtf8 returns a temporary, accessing constData isn't safe
Change-Id: I3c4d077f24cee0eaf1df230c4d8079619967b51a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: I9926f1ab10ea04387f17794944dcc11f4a2a9054
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Encapsulate accesses to the current context, and rework
the way we push and pop this context from the context
stack.
Largely a cleanup, but simplifies the code in the long term
Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove all the calls to setVTable that were in performance
critical parts of the code. This now brings performance
back to the level we had with the vtable inlined in the
Managed objects.
Change-Id: I76317cc5c53b5b700d1d3883b954407142a4c424
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This saves one pointer per object, and willmake other optimizations
easier in the future.
Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't assume a four characters long file name suffix (.qml)
Task-number: QTBUG-32850
Change-Id: I522c06b71bf1b38f32f2947a6c06017f83eb50be
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
toUtf8 would return a temporary, and constData would hold a pointer inside that
temporary. This isn't even remotely safe. Move the pointer use down to the
initializeEngine call so it is kept around long enough for us to do our stuff.
Task-number: QTBUG-35355
Task-number: QTBUG-35343
Change-Id: Ie816d0d1a37e42607f26d9ad02cf999f3d459cd9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The "Qml" prefix should suffice.
This was found by ICC 14.0 in a bogus warning:
qqml.h(470): error #2415: variable "CurrentSingletonTypeRegistrationVersion" of static storage duration was declared but never referenced
Change-Id: I604cd712529b1c4553457c1ea0904182ac4a9e80
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The m_line and m_column members are of type quint16, so -1 is not
valid. BTW, aren't 65535 possible lines too few?
qqmlboundsignal.cpp(92): error #68: integer conversion resulted in a change of sign
Change-Id: I2f73c276c5fc9b6988b5fa4274f7fa3f6bb85c4b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For example the x property in
PropertyChanges {
target: foo
x: someItem.x - other.width / 2
}
was compiled at run-time dynamically, which produces slower code (no type
information available) and slows down the type instantiation, because the
compilation happens every time at instantiation time (or later).
With this change, when the custom parser behind PropertyChanges requests a
binding ID for "x", the right hand side will be added to the bindings to
compile, then compiled and later at run-time the QQmlBinding constructor that
takes a QQmlBinding::Identifier can retrieve the correct compiled function from
the QV4::CompiledData::CompilationUnit.
Change-Id: I857fb2d39e82714b225bc9394b9904b795c6662b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are 3 ways to create objects: "Simple", "Cpp" and "Qml". This
patch starts a new profiler whenever a new object is created.
It's assumed that everything the interpreter main loop does between
two creation instructions is related to the object just created.
The componentComplete calls are profiled by restoring saved states
of the profilers used during the creation of the respective objects.
Task-number: QTCREATORBUG-10631
Change-Id: I2645eab7ba32dfb8749cb51ec888d0f0e8fef188
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old way the object creation profiler works is unsuitable for
detailed profiling as it only tracks top level components.
Task-number: QTCREATORBUG-10631
Change-Id: I502d0e144f2965f5e09af8461b50b56c61de5b4b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GCC 4.7-4.9 are right that the "code" member is used uninitialized. In
fact, GCC 4.9 was quite assertive about it:
qqmlinstruction_p.h:538:102: error: ‘def.QQmlInstructionData<8>::<anonymous>.QQmlInstruction::instr_common::code’ is used uninitialized in this function [-Werror=uninitialized]
static void setData(QQmlInstruction &instr, const DataType &v) { memcpy(&instr.FMT, &v, Size); } \
^
(It says "is used uninitialized" for this particular case; the "may be
used uninitialized" appears in other places)
The analysis is as follows:
- variable declared on qqmlcompiler.cpp:1467:
Instruction::SetDefault def;
- type is POD, so no initialization is performed (def contains garbage)
- on qqmlcompiler.cpp:1468 we use the variable:
output->addInstruction(def);
- QQmlCompiledData::addInstruction is inlined and does:
QQmlInstructionMeta<Instr>::setData(genericInstr, data);
- which is the call above, doing a memcpy with a source (&v) equal to
the uninitialized "def" variable
- result: memcpy is copying uninitialized bytes
Valgrind doesn't report this because it doesn't care about copying
uninitialized data. It will only complain if a decision is made based
on it, which we don't since the first thing we do after the memcpy is
initialize the member.
The solution is simple to not copy the common part of the
instructions. This way, we save 8 bytes of unnecessary copying and we
still keep the warning if a member of an extended instruction isn't
set.
Change-Id: I940b40ea9aa61c7386e5cced4a7865be7bfddb5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't do a fast property index based access on them, due to the inability to
read individual fields from the original object (i.e. the logic in
QQmlValueTypeWrapper). However what we can determine and propagate is the type
information of the individual properties, i.e. that the x and y properties of a
QPointF are always doubles.
Change-Id: Iee71ece2117294b7bc0b93deb0a77d7c51148b11
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Resolve lookups in namespaces at compile time and instruct the SSA optimizer
to eliminate reads from the namespace (QQmlTypeWrapper) if possible. For example
access to attached properties of types (i.e. MyNameSpace.ListView.isCurrentItem)
requires neither reading the namespace nor the type.
* Add support for accelerated lookup of attached properties
Change-Id: Ib0b66404ed7e70e1d4a46a1ac8218743a4cc8608
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\|
| |
| |
| |
| |
| | |
into stable
Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We store QQmlPropertyData pointers in our IR for Qt meta-object property
resolution at compile time. As it turns out however, it is possible that these
pointers change after retrieval from the QQmlPropertyCache, as the cache may
change later in the compilation process. Therefore we must do what also
QQmlCompiler does by storing a copy of the QQmlPropertyData. For the JS IR we
can do that conveniently through the IR memory pool.
A side-effect of this bug was that QQmlPropertyData pointers were re-used
and so the identity check in the isel later such as
_function->contextObjectDependencies.contains(m->property)
for dependency tracking failed. In the example given in the bug report it was
determined that the window.contentWidth property wouldn't need a property
capture, and therefore the binding was not re-evaluated as window.contentWidth
later in the binding evaluation phase received its correct value.
This patch also fixes the incorrect debug output names assigned to JS binding
expressions, where the index used to look up the name is per compiled object,
not per QML component.
Task-number: QTBUG-35063
Change-Id: I3e5bbfaac11e5c122a2ed15a3e486a93988e1b6e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch changes QQmlData to share the very first bit with QDeclarativeData,
to indicate if the QObject in question is exposed in the QML1 or QML2 run-time.
Task-number: QTBUG-35006
Change-Id: I3aa1d7c99038792011afd9f481ad30d9b981721f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this patch we determine the meta-object of singletons, propagate it into
the IR and load them separately using a dedicated run-time function. In
addition enums in singletons and QML types are resolved at compile time.
Change-Id: I01ce1288391b476d1c9af669cb2987a44c885703
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...instead of a special MEMBER type. This allows removing the
type member from V4IR::Member altogether (and thus unshadow from
V4IR::Expr::type). By not requiring the base of a id lookup
member expression to be a NAME, we can also speed up repeated
id lookups by fetching the id object array wrapper only once
per function.
Change-Id: I3e9b8f498d32ace4a0cc2254f49e02ecc124f79c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Propagate QObject properties in member expressions across temporaries
as part of the type interference SSA pass. This replaces the earlier
attempt to resolving QObject properties in fieldMemberExpression()
in the codegen, but it was incomplete and now things like the following
are fully resolved:
var tmp = blah.somePropertyThatReturnsAQQuickItem; <-- QQuickItem property return type propagated into tmp
var width = tmp.width; <-- and picked up here again to resolve the index of width instead of by name
With this patch Temp gets a helper structure with a function pointer,
initialized to aid the resolution of properties in Qt meta objects. This
structure is propagated into the temps until it reaches the next member
expression that uses the temp. Similarly QObjectType is added as IR type, next
to VarType.
The resolution inside the SSA type interference pass also requires passing
through the QQmlEngine from the upper caller levels, in order to resolve the
property type to a potential QMetaObject property.
Change-Id: I14c98fa455db57603da46613ce49c174d0944291
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|/
|
|
|
|
|
|
|
|
| |
QQmlTypeLoader references QQmlImportDatabase in a thread, so change the
declaration order so QQmlTypeLoader is destroyed and its thread stopped
before QQmlImportDatabase is destroyed.
Change-Id: If1f8ef0a5ce56103a417ecfb6897d2c3b9c8d364
Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Try to fix QTBUG-34834, where the app crashes because we replaced
qSort with std::sort(). Apparently std::sort always dereferences
begin(), even if it is the same as end().
Task-number: QTBUG-34834
Change-Id: I6207a27f61f21265dd964d7f4a6b78d059c615c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
References to id addressed QML objects are member expressions, which are unlike
other member expressions by not being lvalues. Handle this correctly.
Task-Number: QTBUG-34890
Change-Id: Ied6230edbc561128ad36bf0d1a1918185204deec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise you can end up with some weird situation in which you have
two objects, you print them and then you print the comparison and get
a Foo(0x858480) b Foo(0x858480) a == b false
Task-number: QTBUG-34651
Change-Id: Id2444d919f039be085eb5ed9112345db691540a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment you can pass them as their FinalType* or
as one of their ParentType* but not as QObject* which
does not make much sense to me
Task-number: QTBUG-34617
Task-number: QTBUG-30730
Change-Id: Id5cfb7bbb123456ef43f44f33b450f8966a7641a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Making it public right now seems a little premature, given all the work
happening on the engine now (and for 5.3). We'll be in a better position
to commit to it or not next release.
Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the
implementation (instead of making that "the API").
Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There's another code path which loads qmldir files directly, and it did
not use the interceptor when available.
Note that this, like other interceptors, does not affect baseUrl and so
any other qmldir file still must have paths relative from the initial URL.
Change-Id: I620943c36d488d22fbaf1793514075d31ab76e3e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new public API to register a QML based singleton type from
C++. This is the equivalent of the the qmlRegisterType, but for
singletons. qmldir file is not needed for types registered through
this function, but the type still needs to include the following
pragma statement among the import statements:
pragma Singleton
Change-Id: Icb35b665fe2a8605667fe8ac575347be2a60490c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
...instead of potentially just crashing. This is for the rare case
of somebody trying to run a QML2 based application on a Pentium 3
from before 2001 or older.
Change-Id: Ia5606fe28ef5579654ec939c86830af70dbb84d7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Get rid of the SimpleCallContext, instead simply
use the CallContext data structure, but don't
initialize the unused variables.
Change-Id: I11b311986da180c62c815b516a2c55844156d0ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
The literals are all latin1 strings, and fromLatin1() is much faster.
Change-Id: I25af0358a0a4aa2e973349c027cfac50b7589429
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
|
|
|
|
|
|
|
|
|
| |
expressions
This is a regression from 5.1
Change-Id: I61ad372a02d937c195dad74bd9fcb8fd4410d97a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|