aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Say hello to the Declarative State Machine FrameworkBrett Stottlemyer2014-08-0838-3/+3089
| | | | | | | | | | | | | | | | | | The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML to provide types for creating and executing state graphs in QML. This gives you the power of deterministic state machines, but declaratively and without having to write all of the boilerplate code. It is an alternative to the existing QML State type, intended for more complex models. [ChangeLog][QtQML] The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML. This gives you the power of deterministic state machines, but declaratively. Change-Id: I02390ba7f1baed50935364530925bd75087299cb Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Do not emit Timer.onTriggered while executing arbitrary JS codeGunnar Sletta2014-08-082-8/+37
| | | | | | | Task-number: QTBUG-39371 Change-Id: Ibf232560918d30961bd979e14aac3ae7d2f264eb Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Add Window attached property on ItemShawn Rutledge2014-08-086-0/+253
| | | | | | | | | | | | | | | | | | | | | | | | | An Item sometimes needs to know a few things about the window in which it is being displayed; this attached property can expose them without needing to go up the heirarchy to find the window. Instead of adding the QQuickWindow pointer as a property on Item as in 8f49f50a169db85401eb37daf4fe3a0fc3280603, having an attached property means that it will not be found by introspection; and it solves the problem that Window is in the QtQuick.Window module: you must import the module to use the attached property, instead of having access to a pointer whose type might not be defined if you didn't import it. The Window attached property is created on-demand (so the memory cost adds up if you use it in too many places); the tradeoff is that it can exist even when the item is not yet being shown in a window, so bindings at startup work. The API is purposely incomplete compared to that in QQuickWindow so that we can introduce what is needed in a controlled fasion over time. For now we know of use cases for visibility, active and activeFocusItem. [ChangeLog][QtQuick][Window] Added Item.Window attached property Change-Id: I649404cbd1383326678aa2144f790b2f2542dbbc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge "Merge branch '5.3' into dev" into refs/staging/devGunnar Sletta2014-08-088-39/+75
|\
| * Merge branch '5.3' into devGunnar Sletta2014-08-078-39/+75
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcontext2d.cpp src/quick/items/context2d/qquickcontext2dtexture.cpp Change-Id: I1a9b911b3a92333a5dddbaf43275f71bad2006f0
| | * More QQuickCanvas cleanup handling.Gunnar Sletta2014-08-014-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid calling into QQuickContext2D from QQuickContext2DTexture after QQuickContext2D has been deleted. We acheive this by 1. Giving the texture a direct pointer to the gl context and and surface, so that it doesn't need to go through m_context to get to them (which may have been deleted). 2. Protect access to QQuickContext2DTexture::m_context with a mutex and make sure it is set to 0 in a safe manner when the QQuickContext2D object is deleted. Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Make canvas cleanup work propertly...Gunnar Sletta2014-08-013-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on which mode we are in, we need to run cleanup on the right thread and in the right way. Image canvas doesn't contain any GL resources and can be nuked right away. The actual QSGTexture is managed by the node, so we don't need to worry about it. For FBO it is a bit more complicated. - Threaded: We create a cleanup handler that runs makeCurrent deleteTexture and doneCurrent and then release the surface on the GUI thread. - Immediate: Same as threaded, just right away - Cooperative: Schedule the texture to be deleted on the next sync. The Context doesn't have its own GL context in this case, so don't worry about it. Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Use the current context to resolve extensions.Gunnar Sletta2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating the code to not use direct gl calls, this code was changed to use the context's gl context. The context doesn't have a context when the rendering happens on the same thread as the scene graph rendering and we get a crash. Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Fix assertion: ASSERT: "hasException" in file jsruntime/qv4engine.cpp, line 933Robin Burchell2014-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was seemingly tripped by trying to catch the exception twice: once with catchException and once with catchExceptionAsQmlError. Change-Id: I7176d56fe6e6f748e80d0894e314ed2b8f6e751d Done-by: Mikko Harju <mikko.harju@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * Merge remote-tracking branch 'origin/stable' into 5.3J-P Nurmi2014-07-302-2/+18
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I80584b4f7d62cd86d3449e19176118e3bed886c1
| | | * Fix QQmlDelegateModel ignoring layoutChange in certain situationsDan Vrátil2014-06-292-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression introduced by commit a0aefe1 which caused the model to ignore layout changes if d->m_adaptorModel.rootIndex was just a descendant of any of the parent indexes, or when no parent indexes at all were provided in the notification. Task-number: QTBUG-39492 Change-Id: I4c97929d25ef75947ccfcbbe5bc234096689c58d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * | Fix QQmlDelegateModel getting out of syncDan Vrátil2014-07-301-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced by a0aefe1, which caused that the source data model and adaptorModel could sometimes get out of sync. Change-Id: Ia6b5fc380cc6cf6549ae857e6da54e088a5dadb5 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| | * | QQuickWindow: add some links to resetOpenGLStateGiuseppe D'Angelo2014-07-291-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or people might not find it. So link it from the docs of the various signals which expect the users to leave the GL state as they found it. Change-Id: I1ae41958449ded110aa2398b415d593bf04d2b7f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | V4 IR: extend BasicBlockSet functionality.Erik Verbruggen2014-08-081-4/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used in later patches. Change-Id: I379addaea225482bcbfd7a0b03dbdbaa254dd579 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | | V4: change string flattening to be iterative and use a worklist.Erik Verbruggen2014-08-082-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And not recursive, because that might blow out of stack space. Task-number: QTBUG-39520 Change-Id: Id961d4af03a543d3efa173f976626cf2dae4f483 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | | V4: add more line number information.Erik Verbruggen2014-08-082-52/+57
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibd3e747918dc0bc939fcbd173585fb1e4d4f08fb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | | Add support for conditional breakpoints and evaluate.Erik Verbruggen2014-08-087-64/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also centralized the context state saver and added line number saving, so that the JS jobs for evaluation of breakpoint conditions don't change the state of the current engine context. Task-number: QTBUG-37119 Task-number: QTCREATORBUG-11516 Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | | Add declarative QQuickTextMetrics API from QQuickFontMetrics invokablesMitch Curtis2014-08-085-5/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows use of a declarative API for the functions in QFontMetricsF which take parameters. This solves the problem of QML expressions that use QML methods not being re-evaluated when the internal data changes, by allowing the user to set the arguments as properties of a TextMetrics object, that would otherwise have to be passed to QML methods. For example: FontMetrics { id: fontMetrics } property rect r: fontMetrics.boundingRect("Blah") At some point, the font of the FontMetrics object is changed, but r will still represent the original bounding rect. Instead, the user will now write: TextMetrics { id: textMetrics text: "Blah" } property rect r: textMetrics.boundingRect The QML methods remain in QQuickFontMetrics for those who need an imperative API. [ChangeLog][QtQuick] Added QQuickTextMetrics, which provides a declarative API for the functions in QFontMetricsF which take arguments. Change-Id: I019dc4639531906fc751ba61281cc1c695742287 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | | MultiPointTouchArea: Guard _mouseTouchPoint with a QPointer.Robin Burchell2014-08-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The touch point can be deleted (for instance, on ungrab()) without _mouseTouchPoint being reset occurs. This caused a crash on tst_qquickmultipointtoucharea::inFlickable with MallocScribble=1 enabled on OS X (use-after-free). Change-Id: Ife9f59d75827285b18bb1772ddbee30d79a3f0b5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | | Handle scene graph invalidationGunnar Sletta2014-08-082-0/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: Icff592a4ae48444a36406a65c1c04a3a6da77616 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | Make sure texture factories are delete before libraries are unloaded.Gunnar Sletta2014-08-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because scene graph adaptations and custom implementations can instantiate QQuickTextureFactories, we need to make sure that their destructors are called before their libraries are unloaded to avoid crashes on shutdown. Change-Id: I17d38e2909aabcb4ea7bf4eecc29df86c8479fdb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | | QQuickText::itemChange must call QQuickItem::itemChangeShawn Rutledge2014-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The need for this was documented, but not done in this case. d5e612fb3e9753c762b741d135fabd2b1f8ae1a6 So it was not possible to use the windowChanged signal inside a Text. Change-Id: I4e3a49ca898cbd09b5731bd133cf93c212062fa2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | | TextInput::displayText: include partial input from an input methodJ-P Nurmi2014-08-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][Important Behavior Changes] TextInput::displayText now includes also partial input from an input method and thus matches with the actual displayed text. Task-number: QTBUG-40329 Change-Id: I407f464938c550d73eba1351283ec751aa293380 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | | ListView: add support for "pull back" header & footerJ-P Nurmi2014-08-083-24/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][ListView] Introduced headerPositioning and footerPositioning properties to control whether header and footer are positioned inline, as overlays, or so that they slide away and can be pulled back regardless of the content position. Change-Id: Ifef1faf1ce6acf2b55cd1b6408e22ec2de841409 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | | Rename QQuickRenderControl::stop() to invalidate()Laszlo Agocs2014-08-074-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To be consistent. Change-Id: Ia78bf4a27e8ccb1a4f0a44865e810f1070c39e5d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | | Accelerate property lookups for C++-based QObject singletons.Michael Brasser2014-08-0716-12/+61
| | | | | | | | | | | | | | | | | | | | Change-Id: Icbdf06a077014db5dd57cba42f84591433ec4196 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | | Allow simple ShaderEffects to be batched by the renderer.Michael Brasser2014-08-077-45/+131
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Identical ShaderEffects that use the standard vertex shader with a single source texture, and that set supportsAtlasTextures, are now candidates for batching. Task-number: QTBUG-37914 Change-Id: Ib0ce58647a8c7c48e88bd84cf2645f1a8f28691f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Fix Flickable mouse grab issue.Robert Griebl2014-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue cannot be reproduced on the desktop with a mouse (at least I could not). It can however reliably be reproduced on iMX6 embedded hardware with a touch-screen. It seems like the TS driver is reporting mouse events with a much more coarse granularity than the USB mouse driver, which in turn triggers this bug. (Qt4's declarative, as well as Qt5's quick1 and 2 all have the same issue) Change-Id: Id151e3847bc8d77c7b405b9c4d4d5747a6e33ed0 Task-number: QTBUG-27185# Please enter the commit message for your changes. Lines starting Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | | Use the renamed qt_gl_global_share_contextJocelyn Turcotte2014-08-055-9/+9
| | | | | | | | | | | | | | | Change-Id: I438c33a1dc83fd0cd1ec08bb4e4a1257a3216ca2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Fix uninitialized memory readLars Knoll2014-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly initialize the markBit to 0. This is important for stack based execution contexts that can have uninitialized data in the bit. Change-Id: I50f1286949f1b4732e3a31b83b238bc7dcf7c7a7 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Clean up Image and ShaderEffectSource properly.Gunnar Sletta2014-08-044-12/+77
| | | | | | | | | | | | | | | Change-Id: I9e3eb5f65ea5f46d30fb7905d0f9c479da367bf5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Make ssa compile on Android with gcc 4.6Laszlo Agocs2014-08-041-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid errors like compiler/qv4ssa.cpp:660:59: error: no matching function for call to 'sort(QVector<QV4::IR::BasicBlock*>::iterator, QVector<QV4::IR::BasicBlock*>::iterator, (anonymous namespace)::DominatorTree::calculateDFNodeIterOrder() const::Cmp)' Change-Id: I4189bd621f1cef5e00b06f5b6b6dd430fefe653f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | Support Canvas.antialiasing without multisample support.Gunnar Sletta2014-08-014-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FBO based rendering relies on framebuffer multisampling to do antialiasing, which is often not available on OpenGL ES and even on some desktop chips. As a high-level API, it is quite bad that Canvas users (on embedded in particular) have to choose between quality (Image) or performance (FBO). This change implements super sampling, rendering the content at twice the size and then scaling it down. [ChangeLog][QtQuick][Canvas] Implement antialiasing on FramebufferObject based render targets through super-sampling (SSAA) when framebuffer multisampling is not available. Change-Id: I373f3a645342dac157506b746c1e39b0f3f3f9f2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Expose the scene graph publically through a QSGEngine classJocelyn Turcotte2014-08-0113-140/+909
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change wraps QSGRenderContext and QSGContext in a new QSGEngine class, and expose a public interface of QSGRenderer through a QSGAbstractRenderer to make it usable on a standalone window or FBO. Change-Id: I2d41187472424f5ea64650a006bcd61f2711f6b9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-08-019-57/+74
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-299-57/+74
| |\| | | | | | | | | | | | | | Change-Id: Id95f7b01de36bccecbb7b73acc041654a1fe2ebe
| | * | Remove metaobject revisioning for QQuickScreenAttachedAlan Alpert2014-07-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached property versioning is not currently fully supported. Initial approach was to add the version tags and not enforce them until you could version attached properties. However the QML engine is currently erroring on this. Specific error example: ""Screen.onNameChanged" is not available due to component versioning " Workaround recommended in the JIRA task is to just not version them, until attached property versioning is fully implemented. Task-number: QTBUG-35569 Change-Id: I5ded7eb223ec00f70d847b3fac09ec240d5d7901 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * | Don't dereference null pointer.Sérgio Martins2014-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-40448 Change-Id: I75eb886ae765191101d6b01ebd038211e5fe8fba Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * | Flickable: Cancel interaction on interactive changesAlbert Astals Cid2014-07-282-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise if you have a listview with a flickable inside with a mouseare inside the pressed is never set to false if you make the interactive property of the outer list depend on the moving of the inner flickable. This makes that when later you change currentIndex of the list and you have StrictlyEnforceRange set, the list won't move because it still thinks it is pressed Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
| | * | Don't try to draw shader effect sources with dims < 0.Gunnar Sletta2014-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-40099 Change-Id: I0eb0d877963a9394765ec8e0f10569a98a263743 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * | QQuickMouseArea: Mark override functions with Q_DECL_OVERRIDEAlbert Astals Cid2014-07-281-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6fb5fd48a24affc463c5eb7ea0e80c81fab33f66 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| | * | Fix interaction of garbage collector with JS objects during QML type ↵Simon Hausmann2014-07-263-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instantiation It may happen that during the lengthy process of instantiating a tree of objects for QML, the garbage collector runs. For objects created by QML we support different ownership models, for example in QtQuick visual parents keep their visual children alive, despite perhaps a lack of QObject parentship. That ownership becomes active once the QML autoparent function has assigned the correct visual parent, which happens after object instantiation (after QQmlObjectCreator). Similarly when a composite type is created, its QObject parent is only set after all properties have been set. The root QObject is kept alive through a special boolean, but if the sub-objects aren't children yet, their JS wrapper might get deleted. For composite types with var properties, that also means their var properties get deleted, such as the model property of TableView.qml in the bug report. In the future we want to support creating QWidget hierarchies with QML, which also for layouts may rely on a delayed parent assignment for layouts. To accommodate all this, this patch introduces an array on the JS stack that keeps track of all JS wrappers for all QObjects created. This array is alive during object tree creation. Afterwards, the different ownership models take over, for example the auto parent function assigning a visual parent. This patch also fixes an off-by-one in the total object count calculation for composite types, where when instantiating a composite type as a sub-object we counted the sub composite's object count but forgot the object itself. Task-number: QTBUG-38835 Task-number: QTBUG-39966 Change-Id: I6104b2434510642081e0c54793ed296adeca7481 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | Fix touch/mouse propagation bugsMartin Jones2014-08-014-54/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filtered mouse release was not delivered if another touch started after a touchMouseId was activated. This meant that any filters expecting a release event would not receive it if another touch was made before release of the touchMouseId. We prevented a touch becoming the touchMouseId in the child mouse filters if there were any existing touches. The normal event delivery, however, does not require a single touch. Further to the previous, a touch could become the touchMouseId, even if the initial press happened when there was an existing touchMouseId. This meant that a touch could turn into a mouse when the existing mouse event was released, resulting in a new touchMouseId which hadn't been through child mouse filters. Flickable delayed press should be sent via normal event processing, as other touch/mouse events are now delivered in this way. We often called childMouseEventFilter() multiple times for each event. This is bad because the gesture handling relies on claiming a gesture in one event, then stealing it in the next. Instead of sending touch to mouse candidate points already determined to be within the item bounds and already transformed, we sent all of the points to the mouse recipient. PinchArea did not store the starting position at the original touch points, so other items could pass the dragThreshold before PinchArea and steal a gesture meant for PinchArea. Task-number: QTBUG-40330 Change-Id: Ic0009c176d3d1cb7cff0b5eda076a2c3ca864136 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | | Make canvas cleanup work propertly...Gunnar Sletta2014-07-313-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on which mode we are in, we need to run cleanup on the right thread and in the right way. Image canvas doesn't contain any GL resources and can be nuked right away. The actual QSGTexture is managed by the node, so we don't need to worry about it. For FBO it is a bit more complicated. - Threaded: We create a cleanup handler that runs makeCurrent deleteTexture and doneCurrent and then release the surface on the GUI thread. - Immediate: Same as threaded, just right away - Cooperative: Schedule the texture to be deleted on the next sync. The Context doesn't have its own GL context in this case, so don't worry about it. Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | Document how to clean up graphics resources properlyGunnar Sletta2014-07-311-10/+71
| | | | | | | | | | | | | | | | | | | | Change-Id: I9a1477dcc608372120d8d8c9b57d8e15f8e64312 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | QQuickWindow: fix resetOpenGLState handling of vertex arraysGiuseppe D'Angelo2014-07-312-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the core profile it's forbidden to set vertex attributes (via glVertexAttribPointer and similar) when there's no VAO bound. Similarly, if there's a VAO bound when calling resetOpenGLState, then we need to unbind it or those operations will affect its status. Change-Id: Id7db028ddde9f9429f5a210b8b3d1468888dbce4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | Fix crash when throwing an exception from within a constructorSimon Hausmann2014-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to check for the exception before doing anything with the returned value. Change-Id: I0086be96b2df2434b95187489d7430ae67f561a1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | Avoid eventloop recursion in touch event handling.Gunnar Sletta2014-07-314-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eventloop recursion in the threaded render loop was there to preempt any pending event to make sure we worked with as recent as possible input events. The benefit of this was never verified. The recursion after the actual flush was to fix animations which were constantly started during touch events, such as a behavior tracking the mouse point. This is fixed differently. Event loop recursion is always dangerous, so we're doing what we can to avoid it. Change-Id: I120b2e98350e3b9068153415a671408773fbc769 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | | | Use the current context to resolve extensions.Gunnar Sletta2014-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating the code to not use direct gl calls, this code was changed to use the context's gl context. The context doesn't have a context when the rendering happens on the same thread as the scene graph rendering and we get a crash. Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | Update the WERROR setting for QtQmlThiago Macieira2014-07-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple Clang 5.1 added the -Wunused-const-variable option from Clang 3.4. Change-Id: I95abe373d875ead0565d32187720e1b9042af0ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>