aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* QQmlInstructionData: fix warning 'code' {is,might be} used uninit'edMarc Mutz2014-01-171-0/+4
| | | | | | | | 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>
* Make qtdeclarative compile with QT_NO_TRANSLATIONTasuku Suzuki2014-01-101-3/+5
| | | | | | Change-Id: I73efc8c568e2368bc804eacab9e8f9cced8a030b Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Remove redundant copies of enabled flag in QML profilerUlf Hermann2014-01-091-19/+15
| | | | | | Task-number: QTBUG-35315 Change-Id: Idd35a330531722cb3d4e0d3e95cb3be6e5697688 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Remove unused static functions from QtQml found by Clang 3.4Thiago Macieira2014-01-041-28/+0
| | | | | | | qqmlcomponent.cpp:112:23: error: unused function 'buildTypeNameForDebug' [-Werror,-Wunused-function] Change-Id: I5cc82b20fee8e3f0b61ad59b831723359c8dcda4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix property access to QQmlPropertyMap objects when addressed via idSimon Hausmann2014-01-021-1/+4
| | | | | | | | | | | | 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>
* Doc: Fix broken linksSze Howe Koh2013-12-302-3/+3
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix deadlock when QQmlEngine is destroyed during compilation.Andrew den Exter2013-12-191-14/+27
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-1210-13/+10
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlcompiler.cpp Change-Id: I802731139d47c5b733dd805f7bf432d67d7331e1
| * QQmlImport: Don't try use a dangling pointer.Robin Burchell2013-12-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Revert "Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614"Alan Alpert2013-12-0410-13/+10
| | | | | | | | | | | | | | | | | | | | 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>
* | Use qCpuHasFeature because the check can be optimized out of existenceThiago Macieira2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | Fix broken Maroon game / regression in PropertyChanges {} elementSimon Hausmann2013-12-103-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Windows: Use Shell API for checking file case correctness.Friedemann Kleint2013-12-101-8/+26
| | | | | | | | | | | | | | | | | | 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>
* | Remove unused function isUnicodeNonCharacterThiago Macieira2013-12-081-14/+0
| | | | | | | | | | | | | | | | 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>
* | Fix dynamic properties in QQmlPropertyMap not always being visible in QMLSimon Hausmann2013-12-053-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QQmlMemoryProfiler: Fix dangling pointer use.Robin Burchell2013-12-041-2/+1
| | | | | | | | | | | | | | toUtf8 returns a temporary, accessing constData isn't safe Change-Id: I3c4d077f24cee0eaf1df230c4d8079619967b51a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove unused memberLars Knoll2013-12-042-2/+2
| | | | | | | | | | Change-Id: I9926f1ab10ea04387f17794944dcc11f4a2a9054 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Encapsulate the current context and fix it's usageLars Knoll2013-12-0410-40/+40
| | | | | | | | | | | | | | | | | | | | | | 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 setVTable calls in performance critical areasLars Knoll2013-12-042-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | Move the vtable pointer from the object to the internal classLars Knoll2013-12-048-15/+15
| | | | | | | | | | | | | | | | 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>
* | Fix qsTr() in .js contextJ-P Nurmi2013-12-041-1/+3
| | | | | | | | | | | | | | | | | | 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>
* | QQmlImport: Don't try use a dangling pointer.Robin Burchell2013-12-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Add a namespace for a global variable in a public headerThiago Macieira2013-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix change-of-sign warning in the new QML compilerThiago Macieira2013-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | Add support pre-compiled bindings for QML custom parsersSimon Hausmann2013-11-294-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Use the new object creation profiler in qqmlvmeUlf Hermann2013-11-292-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove old qml object creation profilingUlf Hermann2013-11-293-27/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix warnings: initialize Instruction variables created on the stackThiago Macieira2013-11-292-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Slightly accelerate access to value type propertiesSimon Hausmann2013-11-281-21/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Add support for accelerated property access to QML types and namespace supportSimon Hausmann2013-11-283-2/+17
| | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-11-264-10/+23
|\| | | | | | | | | | | into stable Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
| * Fix memory corruption in QML expression compilationSimon Hausmann2013-11-252-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Allow for QtQml and QtDeclarative to co-exist at run-timeSimon Hausmann2013-11-252-6/+20
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Initial support for accelerated property access to QML singletons and enumsSimon Hausmann2013-11-253-2/+26
| | | | | | | | | | | | | | | | | | 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>
* | IR Cleanup, resolve ID objects through array subscriptsSimon Hausmann2013-11-252-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | ...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>
* | Improve type interference for QObject propertiesSimon Hausmann2013-11-253-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix crash on QQmlEngine destruction.Robin Burchell2013-11-252-2/+2
|/ | | | | | | | | | 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>
* Check that the pathlist is not empty before calling sort() on itLars Knoll2013-11-201-1/+2
| | | | | | | | | | 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>
* Fix failing assertion when trying to assign to an id referenced QML objectSimon Hausmann2013-11-191-0/+5
| | | | | | | | | | 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>
* Make comparison of singletons and qobjects workAlbert Astals Cid2013-11-182-0/+14
| | | | | | | | | | | 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>
* Allow passing qmlRegisterSingletonType QObjects to C++ as QObject*Albert Astals Cid2013-11-142-0/+7
| | | | | | | | | | | | | 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>
* Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614Alan Alpert2013-11-1310-10/+13
| | | | | | | | | 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>
* Polish up QQmlFileSelectorAlan Alpert2013-11-134-13/+84
| | | | | | | | 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>
* Intercept qmldir files with the url interceptorAlan Alpert2013-11-111-7/+20
| | | | | | | | | | | 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>
* Add a new variant of qmlRegisterSingletonType for QML singletons.Antti Piira2013-11-091-0/+18
| | | | | | | | | | | | | | 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>
* For x86 builds, try to detect SSE2 availability early and bail outSimon Hausmann2013-11-091-0/+7
| | | | | | | | | | ...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>
* Fix a few more compiler warnings in release buildsLars Knoll2013-11-093-14/+7
| | | | | Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-098-251/+251
| | | | | | | | | 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>
* Replace QString::fromUtf8() with QString::fromLatin1() for literalsKai Koehne2013-11-061-9/+9
| | | | | | | The literals are all latin1 strings, and fromLatin1() is much faster. Change-Id: I25af0358a0a4aa2e973349c027cfac50b7589429 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Ensure the this object is set correctly to the scope object in binding ↵Simon Hausmann2013-11-055-35/+2
| | | | | | | | | expressions This is a regression from 5.1 Change-Id: I61ad372a02d937c195dad74bd9fcb8fd4410d97a Reviewed-by: Lars Knoll <lars.knoll@digia.com>