aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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-1013-0/+405
| | | | | | | | | | | | | | | | | | | | 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>
* MouseArea: Fix cancelling the double click when the windows loses focusOlivier Goffart2014-09-032-8/+53
| | | | | | | | | | 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-031-8/+13
| | | | | | | | | | | | | 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>
* Fix selection of text with negative right bearingEskil Abrahamsen Blomfeldt2014-09-026-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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-297-0/+65
| | | | | Change-Id: I1f07b6c1ab8afac7ee7ad05e988fe313ba904705 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Add new property "designersupported" to qmldirTim Jenssen2014-08-2812-18/+361
| | | | | | | | | | | | | | | | | 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>
* Added QSGPainterNode abstraction to QSGAdaptationLayerAndy Nichols2014-08-272-4/+4
| | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Simon Hausmann2014-08-264-1/+140
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-264-1/+140
| |\ | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| | * Fix crash with early QObject property accessSimon Hausmann2014-08-252-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * 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>
| | * The cached objects can be deleted, so keep them in a QPointer.Gunnar Sletta2014-08-141-0/+103
| | | | | | | | | | | | | | | | | | Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8 Task-number: QTBUG-40201 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QSM: Reintroduce guard argument evaluationSebastian Sauer2014-08-252-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the suggestion from Simon Hausmann (codereview 89716 from 08-05 14:46) to use QQmlScriptString rather then the previous used MetaObject-manipulation. This also introduces comparison operators for QQmlScriptString to be able to determinate if a QQmlScriptString changed what is needed cause there is otherwise no way to access (all) the needed details within QQmlScriptStringPrivate. Change-Id: I198479eac8fd37cbdd98a99aacdd8eebf7b75d21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove references transforms have to items in QQuickItem's destructor.Mitch Curtis2014-08-252-0/+44
|/ / | | | | | | | | | | | | | | | | | | In case they try to remove themselves from our list of transforms when that list has already been destroyed after ~QQuickItem() has run. Task-number: QTBUG-40877 Change-Id: Ie57f5dd1e8b791846f08629183974c771553c4bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-25594-11251/+6499
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-234-0/+77
| | | | | | | | | | | | | | | | | | | | This way they will at least render. [ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they will still show. Change-Id: I169ecac768036812b8e14265ec1a0a8902655666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Introspect qrc files in FolderListModel.Gatis Paeglis2014-08-225-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | And don't use "file watchers" for resource file paths, otherwise it generates the following warning: QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory Change-Id: I6b75c9195fb2b2ba7b3e0bb7d146fc5cd343927e Task-number: QTBUG-40307 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | v4: Enable primitive conversation to QQmlScriptString in javascriptSebastian Sauer2014-08-222-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes following QML-code proper working: ParentChange { x: 0 Component.onCompleted: x = 10 } where x is a QQmlScriptString. Before this patch an error-message would be thrown that the bool/int/string/etc cannot be converted to a QQmlScriptString. With the patch primitive types including null and undefined are proper converted to a QQmlScriptString. The patch ignores (as in not implements) function/binding assignment. Unfortunately since commit aa25ad8d5f4 its not possible any longer to instanciate QQmlScriptString what means there is otherwise no (easy) way to inject a QQmlScriptString from within Javascript. Change-Id: I18aac6a6e9a57f3b7d0a2d66cdab2be6c3c153c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix setContextObject to re-evaluate bindingsAlex Montgomery2014-08-151-0/+12
| | | | | | | | | | | | | | | | | | Fix QQmlContext::setContextObject to reevaluate bindings as the documentation says that it should. Task-number: QTBUG-40798 Change-Id: Ifbd97c7a07a5432f4948937da863370b05705206 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | CleanupSimon Hausmann2014-08-154-16/+16
| | | | | | | | | | | | | | | | | | Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS units it means a slight increase of memory usage by a few bytes, but overall it makes the code a lot simpler. Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-146-38/+7
|\| | | | | | | Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20
| * Silence harmless compiler warning.Gunnar Sletta2014-08-121-3/+2
| | | | | | | | | | | | | | | | AlignJustify is not a tested value, but the compiler warning can throw you off, so best to keep it quiet. Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * benchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that ↵Robin Burchell2014-08-122-2/+2
| | | | | | | | | | | | | | don't build. Change-Id: I4d2e9bf3a520636c568a6b58e311994693446c97 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * benchmarks/particles: fix projects to actually buildRobin Burchell2014-08-122-2/+2
| | | | | | | | | | Change-Id: I3edb05279119b921b50a0329dfd47f0ff2cdb9bc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Fix compilation of tst_compilation (:-P) benchmark.Robin Burchell2014-08-122-31/+1
| | | | | | | | | | Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Ignore extra arguments passed to Context2D functions.Mitch Curtis2014-08-141-0/+343
| | | | | | | | | | | | | | | | | | | | | | This is in line with what Chrome, Firefox and IE do. This is also how most JavaScript functions in Qt behave by default (for example, TableView::resizeColumnsToContents()). Task-number: QTBUG-40703 Change-Id: I087221e305dcb5fd6709ad4a99a5163d641faac6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove QQuickWindow::glslVersion & glslIsCoreProfileJ-P Nurmi2014-08-131-35/+0
| | | | | | | | | | | | | | | | | | Superceded by the OpenGLInfo attached type => remove the API before it gets released Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-1210-8/+171
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4include.cpp src/quick/items/qquickrendercontrol.cpp src/quick/items/qquickrendercontrol_p.h src/quickwidgets/qquickwidget.cpp Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15
| * Avoid double deletion when deleting an incubating component.Martin Jones2014-08-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing the guards in QQmlIncubatorPrivate::incubate() when a deletion was detected. If we detect a deletion, leave the guards in place, to be handled in QQmlIncubatorPrivate::clear(). Task-number: QTBUG-40685 Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix crash when loading invalid QML with behavior on invalid group propertySimon Hausmann2014-08-083-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behaviors require the creation of a meta-object. However when trying to create a behavior on a non-existent group property, we don't have a base meta-object to base the "new" meta-object on, therefore this patch adds a null pointer check. The error in the QML file itself will be caught later on. The added test ensures that as well as that it doesn't crash of course. Change-Id: If73116053464e7e69b02ef59e8387060835083c8 Task-number: QTBUG-40369 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix Qt.include with cached compilation units and resourcesSimon Hausmann2014-08-063-0/+27
| | | | | | | | | | | | | | | | | | Similar to the worker scripts we also need to do a lookup for cached scripts here. Added also a test to ensure that Qt.include works correctly from Qt resources. Change-Id: Idb67af3da4b0cc91edbd3d2746d074fd68ed8bf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Synchronize PathView gesture grabbing with other items.Martin Jones2014-08-063-4/+137
| | | | | | | | | | | | | | | | | | | | | | PathView didn't attempt to grab the gesture at the same event as other items. This prevented PathView from rightfully claiming the gesture before lower items in the stack. Use the same threshold test for PathView as used elsewhere. Task-number: QTBUG-37859 Change-Id: Ic57cb805ac979e41c3e35d86b2e7db781e61d69d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Add OpenGLInfo attached typeJ-P Nurmi2014-08-114-0/+109
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Introduced OpenGLInfo attached type that provides information about the currently used OpenGL version. Change-Id: Ibdf365decf9d6331cf91c0bf541e493ced02a417 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-111-5/+11
| | | | | | | | | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Say hello to the Declarative State Machine FrameworkBrett Stottlemyer2014-08-086-0/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add Window attached property on ItemShawn Rutledge2014-08-082-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-087-6/+400
|\ \
| * | Merge branch '5.3' into devGunnar Sletta2014-08-077-6/+400
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcontext2d.cpp src/quick/items/context2d/qquickcontext2dtexture.cpp Change-Id: I1a9b911b3a92333a5dddbaf43275f71bad2006f0
| | * Run autotests for Canvas.renderTarget == FramebufferObject also.Gunnar Sletta2014-08-021-2/+2
| | | | | | | | | | | | | | | Change-Id: Id1729966b3b2b75a3bd4ad387b3d7914266fb3a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Merge remote-tracking branch 'origin/stable' into 5.3J-P Nurmi2014-07-302-2/+126
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I80584b4f7d62cd86d3449e19176118e3bed886c1
| | | * Fix QQmlDelegateModel ignoring layoutChange in certain situationsDan Vrátil2014-06-292-2/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-305-2/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | V4: change string flattening to be iterative and use a worklist.Erik Verbruggen2014-08-081-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Add support for conditional breakpoints and evaluate.Erik Verbruggen2014-08-082-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Fix use-after-free in testcase.Erik Verbruggen2014-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to setActive does a deleteLater on the window. Then the QTRY_* macros run the event loop, thereby deleting the window. So, after wrapping the window in a QPointer, that pointer must either be null, or the window shouldn't be visible. Change-Id: Ib3fc5c5284bd5dae378a0f6a17117b262b9a3687 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | TextInput::displayText: include partial input from an input methodJ-P Nurmi2014-08-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>