aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Stabilise and remove insignificant marker from tst_qquickflickable.Robin Burchell2013-12-112-11/+5
| | | | | | | | | | | | | A lot of work has gone into this test already since a79839dc5287de1448d1fd858db312a7bfa7b581, such as 6ba7d88df623df5bce85bfdae853fc49006e76f2. Everything passes for me locally, so let's skip specific tests if they break (or better: fix them) instead of having no test coverage at all. Change-Id: I29a7aeb26b106955c442da26df486cb6ce4bc92a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix up listening for layout direction changes.Robin Burchell2013-12-102-2/+1
| | | | | | | | | | | | | | Change the event type to ApplicationLayoutDirectionChange. LayoutDirectionChange is sent for QWidgets only at present, and was wrong anyway: each widget may have a different layoutDirection, but the application instance only has one -- tied to ApplicationLayoutDirectionChange. Relies on I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 from qtbase to actually function. Task-number: QTBUG-21573 Change-Id: Ibee25927b2213ae9145d46556698f54d5129bd06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Mark item as dirty when nodes are cleanedMichael Brasser2013-12-102-0/+4
| | | | | | | | Otherwise they may not be recreated in the correct configuration. Change-Id: Ib103b1874d7f104680eae7b6f43f722b5fa93bf2 Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix broken Maroon game / regression in PropertyChanges {} elementSimon Hausmann2013-12-109-23/+167
| | | | | | | | | | | | | | | | | | | | | | 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>
* QSGRenderer: sanity check attribute regs only when QSG_SANITY_CHECK=1J-P Nurmi2013-12-101-4/+2
| | | | | | | | | | The sanity check that attribute registers are disabled that was always done in debug mode took roughly 16ms on my machine and caused a trivial QML animation to eat 100% CPU. Task-number: QTBUG-35443 Change-Id: I8ba2a80db341d17e08216b3cad1678dd59b9b1a5 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* V4: change variable renumbering algorithm from recursive to iterative.Erik Verbruggen2013-12-101-89/+237
| | | | | | | | | Replace the recursive calls and subsequent clean-ups by pushing actions on a to-do stack, and processing that stack in a loop. Change-Id: I83536e88d400592b6e9f5fda3d795e41711a131a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Windows: Use Shell API for checking file case correctness.Friedemann Kleint2013-12-102-8/+27
| | | | | | | | | 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>
* Correctly profile the size of loaded pixmapsUlf Hermann2013-12-092-9/+5
| | | | | | | | | | Only set the sizes when they're known, prefer request size to implicit size (as the request size is what ends up in the cache), and don't set the size twice. Task-number: QTBUG-35337 Change-Id: Ie516a1cae2d9050f61362ee99cf8a6a9dd8ea3bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.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 crash in QQuickLoader when source component is garbage collectedSimon Hausmann2013-12-065-0/+38
| | | | | | | | | | It may happen that the QQuickLoader is the last entity left in the system holding a reference to the QQmlComponent *sourceComponent. We have to let the garbage collector know about that by keeping a persistent value for it. Task-number: QTBUG-35334 Change-Id: I715864440378fd9dd4f2d5ef8ff2f171c81ed7ef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Profile a pixmap start event also when loading is asynchronous.Ulf Hermann2013-12-061-0/+3
| | | | | | | | | | | If those events aren't profiled we get unmatched events for finished loading and errors. Task-number: QTBUG-35337 Change-Id: I132638edf5625566e37ee06453484f80b2adb74a Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix: QSGGeometry lineWidth in qsgbatchrendererTorgeir Lilleskog2013-12-061-0/+3
| | | | | | | | | lineWidth was ignored in the new scenegraph batchrenderer. Regression from 5.1.1 Task-number: QTBUG-35346 Change-Id: I80eacc165f70b5f39d4a01cf458ab1a0e49cbd2d Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Propegate filtering state when we extract texture from atlas.Gunnar Sletta2013-12-061-0/+1
| | | | | | | Task-number: QTBUG-35395 Change-Id: I5ac08ade7763d14bca855b8300156aee0e6a6920 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Avoid warnings on cast from char* to QStringThiago Macieira2013-12-061-1/+1
| | | | | | | | | Why isn't QtQml being built with those functions disabled, so they produce errors? Change-Id: I2c0cf945523142800982f100a61a6c10e1929632 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Only emit focusObjectChanged when an actual change occurs.Michael Brasser2013-12-063-2/+25
| | | | | | | Change-Id: If18b460a8773e5cac597c02c51836b79711c20f4 Done-with: Matthew Vogt <matthew.vogt@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Clean up property dependency data structuresSimon Hausmann2013-12-057-141/+87
| | | | | | | | | | | | | | | | As a follow-up to the previous commit, this patch cleans up the data structures used to track dependencies of QML binding expressions and functions to context and scope properties, determined at compile time. Instead of "collecting" these depending properties upfront (codegen time), we propagate the information that a property is a context or scope property into the IR at codegen time and later in the isel collect these properties and their notify signal index in a hash in the IR functions. The CompileData structure generator then can read these hashes directly when writing out the dependency information. Change-Id: I32134706e2d24bf63d1b1abad0259ab072460173 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix dependency calculation for context and scope propertiesSimon Hausmann2013-12-055-4/+40
| | | | | | | | | | | | | | | We were incorrectly calculating writing to a context or scope property as a dependency for an expression. We don't know whether a property is being written only or also being read from at lookup time, but we can make that decision in the isel then when generating the move instructions. So initially context and scope properties end up in a candidate set first and get promoted to real dependencies when they're being used in reading moves. Task-number: QTBUG-35210 Change-Id: Ia67057abafc2d611e1e6605327b4965ebe91cbed Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix data layout of Managed classLars Knoll2013-12-051-4/+4
| | | | | | | | The internal class should really be the first member. The flags should go away over time. Change-Id: Id2373a438e2af63a55704819c9dd5569c3895080 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix dynamic properties in QQmlPropertyMap not always being visible in QMLSimon Hausmann2013-12-054-0/+134
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix Flickable StopAtBounds drag over, back, over behavior.Martin Jones2013-12-053-29/+157
| | | | | | | | | | | | | | | A Flickable with StopAtBounds failed when: 1. position on a boundary. Without lifting your finger: 2. attempt to drag beyond the boundary -> doesn't drag 3. drag back to initiate dragging 4. attempt to quickly drag beyond the boundary. After 4, the view should be back on the boundary, but it could get stuck a little short of the boundary. Change-Id: I9bfbb4293f4d464bddb97c5c37e9bb91ed7d48e4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* V4 IR: reverse propagate int32 truncation.Erik Verbruggen2013-12-046-139/+393
| | | | | Change-Id: I5cb0c7798d0e530f3137710bf0e723bd7b64dc89 Reviewed-by: Simon Hausmann <simon.hausmann@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-044-6/+4
| | | | | Change-Id: I9926f1ab10ea04387f17794944dcc11f4a2a9054 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix some header guardsLars Knoll2013-12-043-4/+4
| | | | | Change-Id: Ib696c79754cc238e3f4fa356c461a07d9f06d6e7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Encapsulate the current context and fix it's usageLars Knoll2013-12-0447-226/+221
| | | | | | | | | | | 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-0421-75/+97
| | | | | | | | | | 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-0453-256/+311
| | | | | | | | 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 a bug in the code for evalLars Knoll2013-12-041-5/+5
| | | | | | | | | When eval was being used as an indirect call, the code didn't reset the current context properly before returning from the eval call. Change-Id: Id5c7e9a897101d25593ef0f3b9945adaf19360b3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a static toArrayIndex() method to QV4::StringLars Knoll2013-12-043-4/+12
| | | | | | | | This avoids a hack in QV4::Codegen where we created a V4::String on the stack to convert to an array index. Change-Id: I9a88d45817bbcde52a4037a52fbae299b8c9cb1a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixup the implementation mess for QJSValue(QString)Lars Knoll2013-12-043-10/+111
| | | | | | | | | | | | | | | Until now we were using a QV4::String without engine to represent this case. But this leads to lots of quirks, where we ended up trying to access the engine (or the internalclass/vtable) of this string anyway. Now just represent it by using an QString in QJSValuePrivate, and use an empty value to represent it. This adds a little bit of code to QJSValue and QJSEngine, but is more stable and maintainable in the longer term. Change-Id: I3358165ee64e788274225743a95dfb13346225cc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize ExecutionContext::setPropertyLars Knoll2013-12-041-3/+12
| | | | | | | | | | No need to call hasProperty followed by put. Instead get the property descriptor and call putValue for it. Improves v8-bench by 5%. Change-Id: Ied047126c651c033f7ad4c27deaeec08e5fee7f9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use an internalClass to represent formals and locals in CallContextsLars Knoll2013-12-047-67/+65
| | | | | | | | | | formals and locals in a CallContext where so far accessed through a linear search in ExecutionContext::getProperty. Fix this by introducing an internalClass for the Function used by the call context. Change-Id: I1141efa12b19d6de4a354bfd6e769c5ffcb8898b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove unused inline wrapperLars Knoll2013-12-045-12/+9
| | | | | | | | | The wrapper method for Function::code() was still there from the times we used C++ exceptions. It's not needed any more, so get rid of it. Change-Id: I2ec25fbca71eeef9d7a94a38b5adfa42e4de3a84 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix url type testLars Knoll2013-12-041-2/+2
| | | | | | | | it passed before, but wasn't testing two methods it should be testing. Change-Id: I5784ecfe1b5a00620832c7b995ed3cf5ed7e27dd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Speedup JS instanceof operatorLars Knoll2013-12-047-58/+50
| | | | | | | | Cache the prototype of the functionobject, and inline hasInstance. This removes a vtbl method and speeds things up quite a bit. Change-Id: Ic68f301f7e09763d445a98bffa2cd201303f902e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Initialize variableLars Knoll2013-12-041-0/+1
| | | | | Change-Id: I37b14a406ebb9cf87fef20426a94725a2441b7cd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix qsTr() in .js contextJ-P Nurmi2013-12-044-32/+137
| | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-12-0340-142/+446
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-0340-142/+446
| |\ | | | | | | | | | Change-Id: I894ad7b4888744833f487b481950c087fa960a5c
| | * Fix style animations to stop when the item is hiddenJ-P Nurmi2013-12-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleAnimation automatically stopped for hidden QWidgets, but didn't know anything about QQuickItems and kept animating regardless of their visibility. QStyleAnimation was changed so that it will keep animating only as long as the animation target accepts animation updates. This change ensures that the style animation updates are accepted only when the item is visible. Task-number: QTBUG-35319 Change-Id: I3c93a653316b8abbbc32940cd7499b660828eff8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| | * Safely abort when we don't succeed in creating a GL context.Gunnar Sletta2013-12-032-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-33363 (cherry-picked from commit 12eab9162781) Change-Id: Ia2b0c329157786cb4ec703989f12d2fdb1ce6bc8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Update changelog for 5.2.0Alan Alpert2013-11-302-26/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Includes taking entries for 5.1.2, which is no longer a general bugfix release. Change-Id: I33b4c06aa83d6344a2f14b4147eaf7056c3bacb9 Reviewed-by: Sergio Ahumada <sahumada@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Doc: Change the order of QQuickText function definitionsTopi Reinio2013-11-301-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Text QML type, some property and method documentation is missing from the output because in the source file, they appear before the '\qmltype Text' command. This change reorders the functions so that qdoc will see all documentation for Text QML type. Task-number: QTBUG-35018 Change-Id: Icd995f66679d5105912ee12a7aeffd510921a54d Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| | * Doc: Update examples used in Writing QML Extensions tutorialTopi Reinio2013-11-3029-39/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the examples to use Qt's resource file system to store the qml files in, enabling them to run unmodified in any platform/build configuration. Also, - Chapter 6: Move the plugin code to a subproject and create a C++ application to use the plugin - Update documentation related to above chapter - Add thumbnails for the examples so they will appear in Qt Creators example list. Task-number: QTBUG-35001 Change-Id: I29122af11bb11c7e5e17993438e5fc18c7f96f89 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| | * Handle boundingboxes with NaN in them.Gunnar Sletta2013-11-302-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NaN does not compare well with other floats. The result is that the bounding box is left at its initial values, FLT_MAX for top-left and FLT_MIN for bottom-right. If so, treat geometry as invalid, aka infinite. Task-number: QTBUG-35192 Change-Id: I1df6987d56a0ce1f500b0eba344a5dcbc55f80a4 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * disable qml import scan for qmljsOswald Buddenhagen2013-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | there is nothing to scan here. Task-number: QTBUG-35160 Change-Id: I47223a295eafe67f0f2dd85a12444260f88d0623 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Ensure that QML Windows respect the default platform window stateTor Arne Vestbø2013-11-302-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'visible' property of a Window would be set on the baseclass QWindow like any other property during QML component creation, which would cause create() to be called and the platform window would be created. This left the 'visibility' of the QML window as Windowed, not respecting the platform defaults for how windows should be shown. The user would have to explicitly set "visibility: Window.AutomaticVisibility" for this default to apply, which doesn't make sense -- it should be the default. We solve this by deferring setVisible and setVisibility on the window until the component is complete and we have a full picture of its state. We then ask the platform for the default state based on the window flags (ensuring that eg "flags: Qt.Popup" will not result in maximized windows on iOS and Android), and apply the deferred visibility. The deferred visibility may still be 'false', but setting the window state makes sense anyways, so that a later "visible = true" will apply the default window state. Deferring platform window creation until the geometry has been potentially set from user code also has the benefit that the platform window can check the geometry and apply a default geometry if it's null. This was not possible when the 'visible' property was a regular property, as you could not know if the user's geometry changes would come after platform window creation. Task-number: QTBUG-35174 Change-Id: Icf3236187992048a85b2196c059f9b54699041a4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * Revert 99480d5420c0beea6771be582c039b550a4461f5Gunnar Sletta2013-11-272-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mac OS X platform plugin has been fixed so that this hack is no longer needed. Not to mention that it breaks on XCB. We keep the warning about bad exposes from the plugin in debug mode. These are still useful for tracking down future bugs. Task-number: QTBUG-35143 Change-Id: I5125f7ae2b7fd77c55e9a29b10aa5434598a9ea9 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>