aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Beautify the qquickviewcomparison exampleLaszlo Agocs2014-09-102-9/+20
| | | | | | | | | | | Remove the red rectangle. Change the background color to a gradient. (taken from rendercontrol) Disable the transparency checkbox everywhere but Linux since it usually will not work. (too much hassle with platform specifics like frameless windows, etc.) Change-Id: I21488386cddc5841a2bdc8104e7abb197b075b0d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* V4 runtime: tune Runtime::add/sub/mul a bit.Erik Verbruggen2014-09-102-38/+33
| | | | | | | | | | Tell the compiler to schedule the int32 case first, tune the double conversion a bit (int64->double is quite expensive), and write the function in such a way that it matches typical overflow idiom which compilers recognize. Change-Id: Ieae9a60275716002fbdbc54e1d7291c8aad8c927 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQuickTextInput: calculate height of cursor rect using QTextLine::height()Richard Moe Gustavsen2014-09-101-4/+2
| | | | | | | | | | | | | | Calculating the height of the line using ascent + descent seems inaccurate, since the result will not match what ends up being drawn. QQuickTextEdit uses instead QTextLine::height() for the same function, and this works correct. Since there seems to be no reason to reinvent how to calculate the height when the line already has a function for that, and since the result also seems to be wrong, we change the implementation to use QTextLine::height(). Change-Id: I9c9cd4360b6d4cfd3582756c4efdff9c02065789 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Don't post deleteLater on invalid canvas contextsUlf Hermann2014-09-101-1/+2
| | | | | | | | QCoreApplication complains about that. The context will only be valid once it has been requested in one way or another. Change-Id: Idb44f2541d71355443a5b491078a3040907b1614 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Disable tst_QQuickListView::programmaticFlickAtBounds()Eskil Abrahamsen Blomfeldt2014-09-101-0/+2
| | | | | | | | This test gives false negatives blocking CI consistently. Change-Id: Id904f147b720a183167f335ee4db856d7e3ca94d Task-number: QTBUG-41228 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix pixel bleed in BorderImageEskil Abrahamsen Blomfeldt2014-09-1019-72/+798
| | | | | | | | | | | | | | | | | | | | Keeping all patches of the border image in the same texture with different sample points can cause parts of the border to bleed over to the center patch. To rectify this, we create a separate texture for each of the nine patches we need, and separate image nodes. To avoid applying antialiasing on the interior edges of the border image, we introduce new antialiasing flags which can be used to specify precisely which edges of the image should be antialiased. [ChangeLog][BorderImage] Fixed possible pixel bleed between border patches and center patch in BorderImage. Change-Id: Icc292b3969217320eecca99e79675316c42eab08 Task-number: QTBUG-35838 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Doc: Fix link to Qt namespacev5.4.0-alpha1Topi Reinio2014-09-051-1/+1
| | | | | | | | | Linking to 'Qt Namespace' will link to the Detailed Description section on the Qt namespace doc. Use the new linking format to link to the start of the page instead. Change-Id: Ib7e1b2b91fd9987262fc1a083ae94ef086260766 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qmlscene: load master translation file before more specific onesShawn Rutledge2014-09-041-7/+3
| | | | | | | | | | It was giving up too early because qmlscene_??.qm doesn't exist. The file qt_??.qm links to all existing Qt-provided translation files, so it is enough by itself unless there are application-specific translations besides. Change-Id: Iebedf54ddb4eef4f4d7da8a7fade1850a366aee8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QQuickTextInput: keep floating point precition when calculating offsetRichard Moe Gustavsen2014-09-041-2/+2
| | | | | | | | | Without this patch, positionToRectangle will return a slightly different rectangle than what ends up being drawn. Change-Id: Ib1a3936f0fab393d6016d85d63547ec7f3036b7a Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* MouseArea: Fix cancelling the double click when the windows loses focusOlivier Goffart2014-09-033-8/+54
| | | | | | | | | | Without this, the next click is not received after the windows loses focus while we double clicked but not released the mouse. This may happen if the onDoubleClicked opens a new window Change-Id: I86742de2bb1ea4c9657b9d5e90472d093293177d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix performance regression caused by SG signals in QQuickItem.Gunnar Sletta2014-09-0314-100/+43
| | | | | | | | | | | | | For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Append scenegraph in MODULE_PLUGIN_TYPES of quick moduleAndy Nichols2014-09-021-1/+2
| | | | | | | | | While scenegraph is already a plugin type, it was not defined as plugin_type by the module feature file so qmake fails to build when using load(qt_plugin). Change-Id: I7a6cf21358bbda9878ebe78b7c208c0ded2cf4a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix selection of text with negative right bearingEskil Abrahamsen Blomfeldt2014-09-028-63/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selecting text with a negative right bearing (like italic text) would cause clipping to occur at the edges of the characters. The algorithm for drawing text and text selection tried to divide the text into two: 1. Selected text, and 2. Unselected text. However, the selected text might be drawn outside the selection rect when it has a negative right bearing. Similarly, unselected text before the selection might overlap with the selection rect when it has a negative right bearing, or unselected text after the selection might overlap if it has a negative left bearing. See added test textinput_italic_selected.qml for an example. To rectify this, we do drawing of selected text like this: 1. Draw all text with unselected color 2. Draw selection rects 3. Draw the following in the selection text color and clipped to the selection rect: A. The selected text B. The unselected text right before the selection C. The unselected text right after the selection To avoid drawing the same text twice for extra boldness, we check if 3B or 3C actually contain 3A, in which case we skip 3A. [ChangeLog][Text] Fixed clipping when selecting text with negative right bearing. Task-number: QTBUG-34233 Change-Id: I3506b3a72a2d963c5f24c5b819bbb92769b9aee1 Reviewed-by: Samuel Nevala <samuel.nevala@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Remove Q_ASSERT when getting the OpenGL Context ProfileAndy Nichols2014-09-011-2/+2
| | | | | | | | | | We do not actually use the OpenGL context in this method other than to query the profile type if one is available. In the case that there is no context the profile type does not matter and the default value of QSurfaceFormat::NoProfile is correct. Change-Id: Ice4440fe0e578d4cdcba347f5325768667722af8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove use of anonymous struct in header fileKai Koehne2014-09-011-4/+2
| | | | | | | | | | | | | Although all compilers seem to support this, anonymous structs have only been added formally to C++ 11. Also, this breaks with a change that adds a constructor to QElapsedTimer: error: member 'QElapsedTimer QQmlInstantiationInterrupt::<anonymous struct>::timer' with constructor not allowed in anonymous aggregate QElapsedTimer timer; ^ Change-Id: I5672060e3a623a5d9c4eb1d4e2981c67b96a1192 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix the dynamic build by not calling glGet directlyLaszlo Agocs2014-08-291-1/+1
| | | | | | Change-Id: I97ee290c31ca4fa0ffc2f822f14bc7d5e34dd222 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QQuickWidget: Keep the offscreen quick window size in syncLaszlo Agocs2014-08-291-7/+9
| | | | | | | | | | | | | | | The resizing logic has some faults: The size change is not always communicated to the offscreen QQuickWindow. When hiding and showing a QQuickWidget we may return early from the resize event handler, skipping the geometry change for the offscreen window. This is wrong. To make sure the sizes always match, set the geometry together with the FBO creation instead. This is much more robust and guarantees that the FBO size and the QQuickWindow size will not be out of sync. Task-number: QTBUG-40517 Change-Id: I61ef3ad2d23dff4280dbf03b57c03c1aeda8dc91 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* tst_qquickcanvasitem: Setting as insignificant.Simo Fält2014-08-291-0/+1
| | | | | | Task-number: QTBUG-41043 Change-Id: Ib438ddc890e9a1ede16731b950b195d4341b8fd0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* introduce *.ui.qml file types as new forms file typeTim Jenssen2014-08-298-0/+72
| | | | | Change-Id: I1f07b6c1ab8afac7ee7ad05e988fe313ba904705 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Abort the application if the render thread fails to startGunnar Sletta2014-08-291-0/+2
| | | | | | | | This is a system-level failure, with which we can do very little, so we abort. Change-Id: I945da8bd28df35a6c8987160a2f0177d27d6c95d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-08-286-15/+15
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-286-15/+15
| |\ | | | | | | | | | Change-Id: I92b91cce499ed4bec64521a581276f397792e218
| | * Use QtQuick.Window 2.2v5.3.2Kai Koehne2014-08-275-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use version 2.2 in the documentation and for the .qmltypes file. The revision for properties got dropped in commit 7ceca6ac0 , and is now dropped from the .qmltypes file, too. The removed signals are also dropped because of that (because they are implicitly declared by the property, anyway). Change-Id: Ia14dd403ce1f098cb378bd7940e8f80f32b770a0 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * Doc: Added a link to the QML advanced tutorialVenu2014-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the need to duplicate the example details that are already covered in the tutorial. Task-number: QTBUG-37203 Change-Id: If7e762dc1d9a572b83bddffe7982aec9a6363408 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | | Add new property "designersupported" to qmldirTim Jenssen2014-08-2823-19/+425
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a property called "designersupported" to qmldir. This allows the Qt Quick Designer to only load plugins that have the line ""designersupported"" in their qmldir file. So the designer can load sub components without risking to load plugins that have never been tested in the designer and that might crash. The check for "designersupported"" is activated by using QQmlImports::setDesignerSupportRequired(). Change-Id: I4bf07cc163faa47996eacb1365a7961c51c51060 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* | TestCase.qml: add missing closing parenthesis to example.Mitch Curtis2014-08-271-1/+1
| | | | | | | | | | Change-Id: I93f1f8ec74808fc0a9f681cd88f7e5616089c80c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix not having a context when making a QQuickWidget visible againLaszlo Agocs2014-08-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we hit the size-is-zero path, the condition that got recently introduced (if fakeHidden && d->context) is not really sufficient. It could be that d->context is valid but the scenegraph is invalidated (i.e. offscreenWindow->openglContext() is null). This case has to be handled the same way. Therefore, the function is now simplified to perform polish & sync in one place. Task-number: QTBUG-40794 Change-Id: Ia54f25fbdc199a0b88501a2d89edb5cee5411972 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Make minimum FBO size 1x1 on newer OSX.Gunnar Sletta2014-08-271-3/+3
| | | | | | | | | | | | | | | | | | This problem existed on 10.6, but is not reproducible on newer MacBookPros, so disable it for 10.8 and up. Change-Id: I0ae216c8e2307df5f77a783ec2d2031bf12ccbf2 Task-number: QTBUG-20193 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Added QSGPainterNode abstraction to QSGAdaptationLayerAndy Nichols2014-08-279-36/+73
| | | | | | | | | | | | | | | | | | This allows the scenegraph backend to customize how QSGPainterNodes are rendered. Change-Id: I640dcf121d0be6bda615cf30591d502329fc89d0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | V4 JIT: fix stack layout.Erik Verbruggen2014-08-261-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d9f33ccdef985badc56fd8940373748626beffc7 introduced an off-by-one in the calculation of the offset of a saved register (in StackLayout::savedRegPointer), resulting in overwriting a callee saved register with the tag of a QV4::Value. This method now calculates those pointers relative to the bottom of the stack frame. The off-by-one didn't happen before that patch, because there was a magical +1 used in the constructor for the number of callee saved registers, thereby prevented this from happening. However, that resulted in a frame size that was unnecessary big. Task-number: QTBUG-40927 Change-Id: If88fe9f3490a4d23a1e69c630c87219fcfef671f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | V4: disable type inference and loop peeling for the interpreter.Erik Verbruggen2014-08-267-21/+39
| | | | | | | | | | | | | | | | | | | | Loop peeling is always disabled. Type inference is still enabled for QML code, because of the static-type nature of the properties. This speeds up crypto.js by 20%. Change-Id: Ibf51cb36f8904d64df0793980d463451dfd361e2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix cursor blinking for TextInput and TextEditSimon Hausmann2014-08-265-44/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit fb339b21b8a24b835cea7a057c47b7c5ad80dd72 relied on the simple transparent rectangle node to remain invisible. After that commit we used the regular rectangle node, which doesn't seem to like toggling the color between transparent and solid black and therefore the cursor was always visible. As advised by Gunnar this patch implements a much simpler logic: When the cursor is supposed to be invisible, we just don't create a scene graph node for it anymore. Change-Id: I7b0e173f6d37997559ee0911f37903efdb14847f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Make QQuickFramebufferObject a texture provider.Gunnar Sletta2014-08-262-4/+60
| | | | | | | | | | Change-Id: Ib9cf0f99dc07e4125c4ccd2d45da2839d8af88b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Fix up vao usage in qquickviewcomparison exampleLaszlo Agocs2014-08-261-3/+6
| | | | | | | | | | | | | | | | | | | | The binder calls create() if needed, so drop that call. In the render function however, drop the binder. Trying to create() again and again on every frame is a waste of time. Change-Id: I1e9cd8e2c97030b96e604256661e65ce75446e9d Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Do not send deferred deletes from the QQuickWindow dtorLaszlo Agocs2014-08-261-2/+0
| | | | | | | | | | | | | | | | | | | | Otherwise doing deleteLater() on an ancestor of the QQuickWindow will cause double deletion for that ancestor. This is typical when using WA_DeleteOnClose since that uses deleteLater(). Task-number: QTBUG-40920 Change-Id: I9146fc0854f77c42cad2eda23b3cdaa7a9e22080 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Simon Hausmann2014-08-2621-27/+246
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-2621-27/+246
| |\| | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| | * Don't use d->instanceModel after free'ing itLars Knoll2014-08-262-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | prevModel points to d->instanceModel and is being used further down in the code. So reset the pointer to 0 after freeing the old instanceModel. Change-Id: I8854ae3e09c8b2fe50ad311f3dbc7b8ed26805e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Fix crash with early QObject property accessSimon Hausmann2014-08-254-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the reported bug, it can happen that we try to access the compile-time resolved QObject property of an object that is referenced by id. The binding that uses this is triggered when the property changes but _also_ when the id referenced object gets either created or deleted. The first time the binding is evaluated is very early on, when the id referenced object is not created yet, so the binding evaluation fails. However the dependency is set up, and so later then the id referenced object is created and the id property is set on the context, the notification triggers and the binding is re-evaluated. During that binding evaluation a QObject property access happens by index on an object that doesn't have its VME meta-object set up yet. Therefore the property access fails and a crash occurs or the Q_ASSERT(property) assertion fails. The fix is to set register the id named object in the context _after_ the VME meta-object is setup. Task-number: QTBUG-40018 Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix typo in DelegateModelGroup documentationAlbert Astals Cid2014-08-251-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| | * Protect some members in QQmlObjectCreatorLars Knoll2014-08-252-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | Avoid dangling pointers when nested incubators are being used. Task-number: QTBUG-40437 Change-Id: I73922d2f373b2efbc00983305cdea9e8d60f0c41 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Initialize variableLars Knoll2014-08-241-1/+1
| | | | | | | | | | | | | | | Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Don't abuse new to do a reinterpret_castLars Knoll2014-08-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using new to do a reinterpret_cast is rather confusing. Also protect the list model case against self-assignment which could lead to memory corruption. Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Protect incubation against its creator being deleted.Gunnar Sletta2014-08-231-1/+1
| | | | | | | | | | | | | | | Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Add 5.3.2 changelog for qtdeclarativeAlan Alpert2014-08-221-0/+41
| | | | | | | | | | | | | | | Change-Id: I33e8149ec9e2f7ecfebb7f55de0dbb291805be93 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Fix crash with recursively loading cached compilation unitsSimon Hausmann2014-08-222-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a cached compilation unit depends on an import that is implemented as a Qml C++ plugin and that plugin in turn loads an asynchronous component that is cached, we would get a crash in the typeloader and a failing assertion (ASSERT: "d->m_mainThreadWaiting == false" in file qml/ftw/qqmlthread.cpp, line 300) This is because we did not implement the asynchronous loading within the loader thread for cached compilation units. This is simply done using a posted event, using the same mechanism used for other async load methods. Change-Id: Iefce67ab634ce26122c348dcdfc8e66b00fec671 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix typo in StateChangeScript documentation.Mitch Curtis2014-08-191-1/+1
| | | | | | | | | | | | | | | Change-Id: Iec72331c183ea02680bad01f04eae82ebd815cdb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * Added the QtSQL dependency info. to the project fileVenu2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without this information the app fails to find the plugin required to load the QtQuick.LocalStorage module on Android. Task-number: QTBUG-37203 Change-Id: I245012e78ab8d1fe3205e08939f4baec58c20759 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * tst_dialogs: verify that rootObject is validRobin Burchell2014-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | if there's an error during loading, it's much easier to spot if this fails rather than crashes. Change-Id: If0106729e18768819da8a877959a095398af8547 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * tst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the ↵Robin Burchell2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | variable. We only assign to the variable once, so the value may not change in time. Change-Id: I54ac7faad60d3984bfde4606aaf7e30a2340ba3e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>