summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
Commit message (Collapse)AuthorAgeFilesLines
* Correct QDeclarativeTextEdit::positionToRectangle().v5.3.0-beta1Mitch Curtis2014-03-201-1/+1
| | | | | | | | | | | d->yoff is the content offset when the content is not top aligned. This means that positionToRectangle() returned incorrect values when the content was bottom or vertical center aligned. In other words, it didn't apply the offset but gave coordinates from the beginning of the content instead of from the beginning of the item. Change-Id: I044b79434b9a67b0539050e39953d5889a3ed1db Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix typos in comments and documentationSergio Ahumada2014-03-051-1/+1
| | | | | Change-Id: Ie7c4d63d632bf32ee583ddcd807252225ddde3fd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Prospective build fix after commit f8dbed12266c42785c1e4758eed05833ec035f33 ↵Simon Hausmann2014-02-172-1/+11
| | | | | | | | | in qtbase Pass through the QVariant argument provided by the caller (QInputMethod). Change-Id: Ia99546cd16287c14ce414d6aad0ea04488e7c6e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix MSVC-warning about unused variable d in qdeclarativeitem.cpp.Friedemann Kleint2014-01-291-3/+2
| | | | | Change-Id: I39fe8076e53d159b060db8884df108a790bc6469 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove QtAlgorithms usage from QtQuick1.Friedemann Kleint2013-09-261-1/+3
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I774f69bd3e60764a144b921a2383d832b38765ce Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge branch 'dev' into stableSergio Ahumada2013-03-1933-123/+2
|\ | | | | | | | | | | This starts Qt 5.1 release cycle Change-Id: Ic10a8c118053323004cafe1b4bffd990a16aaf7f
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-142-18/+29
| |\ | | | | | | | | | Change-Id: I39178ea637dc950cbbb631b725350ab99897ad45
| * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-252-48/+37
| |\ \ | | | | | | | | | | | | Change-Id: I71384165752875c073dfbcbd279cfdc82eeea4dc
| * \ \ Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-02-191-5/+6
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| | * \ \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-181-5/+6
| | |\ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I4fd7f5c1096b0460bd23e2831e6207d63c2b69e3
| * | | | | Fix QDeclarativeListView currentSection property updateNils Jeisecke2013-02-181-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Model modifications that did not trigger the refill logic caused the view's currentSection property to contain an outdated value. A new autotest has been added to catch the bug. Task-number: QTBUG-29712 Change-Id: I88cf1295ac55dad7596b6ba1fe475ebf98a31026 Reviewed-by: Alan Alpert <aalpert@rim.com>
| * | | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2832-123/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ic5b55b26967d65b3f11cac6fc3963f33ec6051a4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | | | | Smooth dragging an item with MouseArea.Andrew den Exter2013-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculate drag distance relative to the mouse position when a drag is detected rather than the press position so there isn't a large change in position on the first move. Task-number: QTBUG-30188 Change-Id: I46918a7b3c62bdaef567b6a9fed651ce33434247 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | | | | Fix jump and property changes on first move when dragging a Flickable.Andrew den Exter2013-03-191-4/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression whereby on the first mouse move the contentItem was moved the total distance from the touch point to where the drag distance was exceeded. For large drag thresholds this causes a noticeable jump. Task-number: QTBUG-30032 Change-Id: I92c119d27dc2e22203484f9ada5978697d171957 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | | | Improve emission of FocusScope focusChanged signals.Andrew den Exter2013-02-272-18/+29
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit activeFocusChanged up the focus tree when an item receives a focus event, rather than when the focusItem changes which happens before internal state is sufficiently updated for hasFocus and hasActiveFocus to return the correct values from within a changed signal handler. There are some limitions to this. First the signals are not emitted reliably when the scene is not active which makes sense for activeFocus but not for focus. The second is in some instances the focus and activeFocus can update unnecessarily while the focus chain sorts itself out. QDeclarativeItem tests by Andreas Aardal Hanssen <andreas@hanssen.name> Task-number: QTBUG-28288 Task-number: QTBUG-25644 Change-Id: Ib3d17c42754c15a08b34c3388f50b45cc1d2a831 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | | Flickable shouldn't grab the mouse until it starts an effective move.Andrew den Exter2013-02-221-26/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the boundBehavior prevents the flickable from moving its content item in response to a drag it shouldn't grab the mouse as that will prevent a parent MouseArea or Flickable from handling the drag. Task-number: 29718 Change-Id: Ief82ef7b898ea2581fd0b7e52548f451d887e2f1 Reviewed-by: Alan Alpert <aalpert@rim.com>
* | | MouseArea shouldn't grab the mouse until there is an effective drag.Andrew den Exter2013-02-221-22/+17
| |/ |/| | | | | | | | | | | | | | | | | A MouseArea shouldn't prevent a parent MouseArea or Flickable from handling a drag event unless it is going to do something useful with it. Task-number: QTBUG-29717 Change-Id: I17caa51ebc2e547e73e727fd185e60644591ad2b Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Doc: Removed reference to deprecated \badcode command.Jerome Pasion2013-02-151-5/+6
|/ | | | | | | | | QDoc doesn't differentiate between \badcode and \code. They both look the same in the output. Change-Id: I3661a893a9413a0b137e236083cc9ac5677ffecb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1087-87/+87
| | | | | | Change-Id: I0281c3f6c10bb7c57f0e470306f38e96badf997b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Backport PathView currentIndex fixes from Qt 5Bea Lam2012-12-121-37/+58
| | | | | | | | | | | | Backport 447e5acb880ebda498891623dc4009984cb73bc6 and 0fc361f96b06ba318e70610e46beb421753cae9d which fix bugs related to currentIndex. The first commit ensures currentIndex=0 when all items are removed; the second ensures that the initial currentIndex value is respected and also resets the view correctly if the model changes. Change-Id: I73266a211001a54163be8415d449802ff077a72e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix crash when mapping coordinates to & from the root item.Nicolas Tisserand2012-12-121-4/+18
| | | | | | | | | | | | | | | The crash triggered by our (supported & documented) use-cases (calling map{From,To}Item with a null value), has been introduced earlier this year, by this change: https://qt.gitorious.org/qt/qt/commit/bec02b3f3 Also: * Clarify QDeclarativeItem::map{From,To}Item statement ordering. * Handle the engine-less item corner case. Change-Id: I33678f7267a4b624bfa61247a643f37ad2ec735d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Ensure QDeclarativeTextLayout uses the correct penChris Adams2012-11-291-1/+12
| | | | | | | | | | | | | | | | | | When a styled text specifies a font region with some color set, QDeclarativeTextLayout used to revert to using a default-constructed (black-colored) pen for text occurring after the </font> tag, rather than the "default" (property-defined) color. This commit ensures that the correct pen is used, by setting the pen of the "inert" painter to be an invalid color rather than a default constructed pen. It then detects when the current pen transitions back to this invalid pen, and switches back to using the default color. Task-number: QTBUG-28135 Change-Id: I6bcc43fbcf7fb2c680959d27b1422364ebb473ae Reviewed-by: Alan Alpert <aalpert@rim.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Compile with QT_NO_CLIPBOARDAndrew den Exter2012-11-261-0/+2
| | | | | | Change-Id: Icfc2b14b1e5ff5eab5fd4af3a6ffbebea6f89e84 Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Port TextInput/TextEdit clipboard optimizations from QtQuick 2.0Andrew den Exter2012-11-234-15/+32
| | | | | | | | | | Don't check if the clipboard has content until necessary as the check can block for an extended period. Port of 3db5afa71443533eee6825a5fb0da29498f96b94 from qtdeclarative. Change-Id: I606af79cbf10b147aa1bb6c182b0a84aabbc5257 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Remove references to QApplication::type()J-P Nurmi2012-11-221-2/+2
| | | | | | | | Qt3 legacy QCoreApplication::Type and QApplication::type() will be removed -> use qobject_cast instead. Change-Id: If95a5552440ace2592332de03f9d2240fa8770b9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix crash in GridViewThomas Hartmann2012-10-231-1/+1
| | | | | | | | | | QDeclarativeGridView crashed in the WelcomeScreen of Qt Creator. For details refer to the task. Task-number: QTBUG-23445 Change-Id: I44594a253a004db254e8cd87560de3f0824a94bf Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Fix QDeclarativeTextInput::moveCursorSelection()Konstantin Ritt2012-10-201-4/+4
| | | | | | | | | | | | by using fixed QTextBoundaryFinder behavior. Update QDeclarativeTextInput autotests. Task-number: QTBUG-11365 Task-number: QTBUG-27364 Change-Id: Idda22f6c0974bf29d2ff961ea8d998a68c3d676b Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change the header message: this is now the QtDeclarative moduleThiago Macieira2012-10-1987-87/+87
| | | | | Change-Id: I18a370a58494049939d035f1c3528406f3f7645f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rename the QtQuick1 module back to QtDeclarativeFriedemann Kleint2012-10-1710-19/+19
| | | | | | | | | | | | | | | | | Matches the name that this code used to have in Qt 4. - Adapt library, change import path to 'QtDeclarative'. - Update the tests and examples to match the new library name. - Rename qtquick1global{_p}.h to qtdeclarativeglobal.h. - Change exports back to Q_DECLARATIVE_[PRIVATE_]EXPORT, like it was in Qt 4 and matching the library name again. This also changes the include guards in qtdeclarativeglobal{,_p}.h. - Fix occurrence of quick_debug in tools/qml/qml.pro. Change-Id: Ibb1fb2e503f90943a2125e4ac3cc4eca3369ca3f Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2487-2088/+2088
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I11a957e35758e821269478ebc91e87f0f5ebc4d5 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Symbian platformKai Koehne2012-09-183-15/+1
| | | | | Change-Id: Iad770614f7c1c890febeee662d0ce9370dcb17e3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Register Qt 4.7 import on-demand, instead of at startup.Robin Burchell2012-09-032-2/+11
| | | | | | | | | | | | | | | | | | | | This is a slightly less awkward approach (keeps backwards-compatibility) while speeding up startup for applications that don't use the old import path. Also prints a warning to let developers know they should migrate their code when possible. Completely disabling the Qt 4.7 import is still possible by setting QT_NO_IMPORT_QT47_QML. This takes around 10-15ms off a very simple "hello world" on my macbook. As an added bonus, forward-port a similar approach to 4.8's a26f545d8e25af74fb43d16c9afa79f6e04463e7 and don't register graphical types in a non-graphical application as someone (very naughtily) apparently forgot to get it integrated to Qt 5 first. Change-Id: I7821523750b3ab6770f367788725d0da70c5ec1f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Compile fix for QWindowSystemInterface and QGraphicsObjectMatthew Vogt2012-08-031-2/+2
| | | | | | | | | Adapt to changes in qtbase - removal of third parameter to the QGraphicsObject ctor, and the declaration of the QWindowSystemInterface class. Change-Id: I8b01ae67f09cbf4fc2e3e062dc8b976ccb061234 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiatesJerome Pasion2012-07-3024-48/+96
| | | | | | | | -\qmlclass is now \qmltype -\instantiates is for QML types implemented in C++ Change-Id: I017822524de1879d272d777ec7681f4233128b01 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* MouseArea: use current value of drag.axisAlberto Mardegan2012-07-272-11/+8
| | | | | | | | | | | | | If the drag.axis is changed while a drag operation is in progress, put it into action immediately. This allows, for example, start a dragging operation out of an item in a scrollable ListView to anywhere on the screen. See the linked bug number for an example. Task-number: QTBUG-26440 Change-Id: I4ffa71c08b97a767aec7f69d19271000a2631327 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Qml ListView highlight component cannot access ListView scopeMartin Jones2012-07-042-64/+48
| | | | | | | | | Use the component creationContext to create the highlight item. Also do this for the header and footer. Task-number: QTBUG-26043 Change-Id: I74276dfbcb4989b8e2b5acf1f2b16ed5537e24de Reviewed-by: Bea Lam <bea.lam@nokia.com>
* anchors.mirrored is documented but does not exist in QtQuick 1Martin Jones2012-06-291-4/+0
| | | | | | | | | anchors.mirrors was removed before QtQuick 1.1 release, but the docs were not removed. Task-number: QTBUG-23427 Change-Id: I8352a444b97a21a98228b85f12a652ed013e93f1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Item.mapFromItem() crashes with Items not created by the engine.Martin Jones2012-06-271-2/+4
| | | | | | | | | | Item.mapFromItem() and Item.mapToItem() get the script engine from the item they are called on. Safer to use the script value passed to the function to determine the engine being used. Task-number: QTBUG-26280 Change-Id: Id72afd723b21ed0f1a747e2d802d6f9715f6c093 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QDeclarativeVisualDataModel crashes getting QAbstractItemModel roles.Martin Jones2012-06-221-2/+3
| | | | | | | | Don't iterate over a temporary. Task-number: QTBUG-26209 Change-Id: Iab99d0756c5c30e4f5bb9b674a20eaf76ebce1e6 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Wrong signals received when moving Flickable elementKatja2012-06-161-2/+2
| | | | | | | | | | Both onMovingHorizontallyChanged and onMovingVerticallyChanged received when Flickable element moved only to one direction. Fixed so that only relevant signal sent. Task-Id: QTBUG-25042 Change-Id: I20acb2403e08c2afa681da2e553cea227c91f001 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Propagate left key presses to the parent item when TextInput is empty.Marcel Schuette2012-05-311-1/+1
| | | | | | | | | Don't overwrite the ignore value once it's been set to true. Backport from QtQUick2 to QtQuick1 in Qt 5 (commit a7017465152d544a4217d5ce4f6f84b80cb9b8b9) Change-Id: Ia93e234773bb75040f889cc03853be311dbafd70 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix compilation for QT_NO_ACTION, QT_NO_CONTEXTMENU and QT_NO_MENUTasuku Suzuki2012-05-291-0/+2
| | | | | Change-Id: I8684a7045100e7020648e54779286ff0d6683ade Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix memory leak in qdeclarativevisualdatamodel.Andrew den Exter2012-05-281-2/+4
| | | | | | | | | | | | | | Cherry-pick of b26a588c1702a84ba853df3c757d879cc9f2fc46 from 4.8 Parent order was backwards, the inner context was parented to the outer context, and then the inner context was reparented to the delegate. Parent the outer context to inner context so both are deleted when the delegate is deleted. Task-number: QTBUG-25784 Change-Id: I4a500b41b02d3cb5dfead4b87ac86e9583024108 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QApplication::keyboardInputDirection is deprecated.Thiago Macieira2012-05-041-1/+2
| | | | | | | Get the direction from the input method. Change-Id: I81c567e0db4787b6f38a4b0446959b85f441625d Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QtQuick1: Fix deprecation warnings.Friedemann Kleint2012-05-021-3/+5
| | | | | | | Introduced by qtbase:0df1c9f1fa04c06d6105de3f312c6c752a58ad70 Change-Id: I61e330707a49efd09bad0efda386712fba207c8a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QInputPanel has been renamed to QInputMethodGirish Ramakrishnan2012-04-141-3/+3
| | | | | | | QGuiApplication::inputPanel will be removed. Change-Id: I8c9a994777301c30f234e0b23816c12ec27c7a0f Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
* TextInput not to use obsolete realText() in QWidgetLineControlPekka Vuorela2012-03-231-1/+1
| | | | | | | As of tentative commit reverting, the method is not available anymore. Change-Id: Iab8f8a860556f2d81bd89567ab7f0225fa03e972 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* TextInput not to emit selection change signals if values do not changePekka Vuorela2012-03-231-8/+7
| | | | | | | | | Fixed also tests with QTBUG-24036 Test was assuming selectionStartChanged and selectionEndChanged to trigger even if their values did not change. Change-Id: I26e57cfb4ff06ec6c195ec2b0d997885c807670b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix QDeclarativeItem::hasActiveFocus().Andreas Aardal Hanssen2012-03-131-2/+5
| | | | | | | | | | | | | | | | | This function returns true if the item (or, in case it's a focus scope, one of its children,) has focus (i.e., will receive key events now), or will receive focus once the scene is activated. It also returns true if the item has not yet been added to a scene, but has subFocus, implicating that someone has called setFocus() on it prior to it being added to the scene; the latter case seen most commonly in unit tests. Task-number: QTBUG-24681 Change-Id: Ia1265158108d5d856b57e34a8efee2545cd0deeb Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-1317-319/+319
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: Iae34eb8f2233dd9dbec79e7ab3c324f3f505b4cc Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>