summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix double transform for items ignoring parent transformations.Andreas Aardal Hanssen2013-08-051-3/+8
| | | | | | | | | | | | | | | | | | | Previously, the topmost untransformable's scene transform, which includes the item's position and local transformation, was used to determine the item's anchoring position. This position was then passed on to be multiplied by the item's transform again. This works fine for toplevel untransformable items that don't have any transform set at all, but those who do would have their transforms applied twice - one to determine the anchoring position, and again to transform the item itself. Since only translation transformations can affect the first operation (the anchoring pos), this bug only applies to items that set ItemIgnoresTransformations and use a local transform that includes translation. Task-number: QTBUG-21618 Change-Id: I3f3c4f2357e2ca6cd0c75cb5b7e428c0803d9e73 Reviewed-by: Alexis Menard <alexis@webkit.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QGV: fix items not to be selected on right mouse button releaseJ-P Nurmi2013-05-151-1/+1
| | | | | | | | Task-number: QTBUG-30990 Change-Id: Iaf2dd7ed496625097daa05d5dc92ef5957574ee9 (Cherry-picked from qtbase/0b862e067756132225e33be09670631edd50d944) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Make sure QGraphicsItem notifies changes to focusScopeItem.Andreas Aardal Hanssen2013-01-291-5/+7
| | | | | | | | | | | | | | | | | | | A glitch in QGraphicsItem's logic made it update the focusScopeItem pointer, but fail to notify the change to QDeclarativeItem through the d_ptr->focusScopeItemChange() virtual function, hindering QDeclarativeItem from emitting focusChanged() correctly for focus scopes that do not have focus. Two lines were moved, and a comment updated to reflect the reason why the "return" is needed at this point. It's clear that the calls to focusScopeItemChange() are unrelated to the return. Task-number: QTBUG-29260 Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd (cherry picked from qtbase/6476d6728eb3cde8e4a5fd0eb607b92977932296) Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Clear focus of GraphicsItem focus scopes and their children.Andrew den Exter2012-12-051-3/+9
| | | | | | | | | | | | | A focus scope has effective focus if one of its children is the focus item, clearFocus() should remove effective focus from an item and its children not just from the focus item. Task-number: QTBUG-28328 Reviewed-by: Martin Jones <martin.jones@jollamobile.com> (cherry picked from commit ab97a44b6ae5cc826460f3704669383afd398594) Change-Id: Ib6f43b40091cb1bb1a0d5b8b9ac71e44f35b037b Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Ensure child items are updated even if the parent item has no contentAndy Shaw2012-09-121-1/+2
| | | | | | | | | | | | | When a parent item had its visiblity toggled, then the child item would not update if the parent item had ItemHasNoContents and ItemClipsChildrenToShape set. This is a common use case in declarative as the root item has ItemHasNoContents set. Task-number: QTBUG-26846 Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 49c251e0543ea80e69d1725bb08bb4dfe3f225ab)
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix dangling pointer issue in QGraphicsItem focus handlingPauli Jarvinen2012-06-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When focused QGraphicsWidget is being hidden, it tries to move the focus to next focusable widget by calling focusNextPrevChild(true). If there is no such widget available, the focus is cleared altogether. The logic used to rely on the return value of focusNextPrevChild to decide if clearing the focus is necessary. This was incorrect because the return value may be true also when the focus has actually moved within the graphics widget in question rather than moving to the next widget. This is the case at least when GraphicsWebView item is focused. Thus, the focus could then be left on invisible item which was a serious issue: elsewhere in the qgraphicsitem.ccp, it is assumed that no visible item can point to invisible item with its subFocus pointer. Such pointers will become dangling pointers once the pointed graphicsitem is deleted, and the process will then crash as soon as the focus is tried to be moved to another item. Now, the logic has been modified so that it is explicitely checked after call to focusNextPrevChild if the item being hidden still has the focus. If this is the case, the focus is cleared. To be consistent, the same logic is applied also when disabling a QGraphicsWidget. Having focus on disabled item is not as severe issue as having it on invisible item, but it is still wrong. Task-number: ou1cimx1#995710 Change-Id: Ica32bc381befc3ccaac79fb4cf4d50c5d452fad0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Various qt documentation fixes (wk 43)artoka2012-01-311-3/+3
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12389 Task-number: QTBUG-16667 Task-number: QTBUG-6151 Task-number: QTBUG-8625 Task-number: QTBUG-19808 Task-number: QTBUG-12096 Task-number: QTBUG-1231 Task-number: QTBUG-21073 Task-number: QTBUG-8939 Task-number: QTBUG-20399 Task-number: QTBUG-20944 Task-number: QTBUG-7542 Task-number: QTBUG-22095 Task-number: QTBUG-11278 Task-number: QTBUG-15653 Change-Id: Ibc369998d06e7f2f11b01a1ba4c2fb927e3c065b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Symbian: Fix exporting and importing of some functions for autotestsMiikka Heikkinen2011-12-211-1/+1
| | | | | | | | | Symbian builds seem more strict about properly declaring exports than other builds, so added proper exporting and importing to some function declarations. Task-number: ou1cimx1#957184 Reviewed-by: mread
* Merge branch 4.7 into qt-4.8-from-4.7Sergio Ahumada2011-11-151-1/+4
|\
| * Fix focusScopeItemChange setting crashDamian Jansen2011-11-151-1/+4
| | | | | | | | | | | | | | | | Delay focusScopeItemChange to after reparenting, to prevent an invalid focusScopeItem pointer crash. Task-number: QTBUG-21640 Reviewed-by: Martin Jones
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Merge branch '4.8-upstream' into master-waterWater-Team2011-10-171-1/+1
|\ \
| * | Converting from double to qreal in guimread2011-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of places in QtGui where doubles were used in expressions due to the use of floating point constants in the code. Many of these constants are now constructed as qreal, removing the use of double operations where unneeded. These changes have been limited to constants that have exactly the same value whether double or float, to ensure that precision errors are not introduced. This should not affect any of the desktop platforms where qreal is double. On Symbian, where qreal is float, appropriate autotests have been run. Task-number: QTBUG-4894 Reviewed-by: Sami Merila
* | | Fix bug in QGraphicsItem::isVisibleTo().Andreas Aardal Hanssen2011-09-291-9/+11
|/ / | | | | | | | | | | | | | | | | Task-number: QTBUG-21612 Reviewed-by: James Perrett Reviewed-by: Magne Pettersen Zachrisen Merge-request: 1396 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
* | Prevent unnecessary graphics item updates when graphics effect changes.Christophe Oosterlynck2011-09-161-16/+20
| | | | | | | | | | | | | | | | | | | | Don't invalidate a QGraphicsItem (neither its cache) when an update is triggered because of a QGraphicsEffect attached to it. Autotest for QGraphicsEffect extended with 2 cache invalidation tests Merge-request: 2681 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | FocusScope's focusItem must always be a descendentAlan Alpert2011-08-301-16/+18
| | | | | | | | | | Task-number: QTBUG-20699 Reviewed-by: Michael Brasser
* | Don't endless loopAlan Alpert2011-08-091-1/+1
| | | | | | | | | | Task-number: QTBUG-20699 Reviewed-by: Michael Brasser
* | Merge remote-tracking branch 'upstream/4.8' into 4.8Frederik Gladhorn2011-06-121-17/+17
|\ \
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Call updateAccessibility on the QGraphicsObject in updateMicroFocusJan-Arve Sæther2011-05-091-6/+10
|/ / | | | | | | | | | | | | | | Since QGraphicsObjects now can be in the a11y hierarchy, we should treat them just like we treat widgets. (cherry picked from commit 860745a4713b29857d14571572504da71a2ca077) Reviewed-by: Frederik Gladhorn
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-071-1/+1
|\ \ | |/ | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm tests/auto/qdiriterator/tst_qdiriterator.cpp
| * Doc: Added a missing command.David Boddie2011-03-251-1/+1
| |
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7David Boddie2011-03-221-1/+11
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/declarative/dynamicobjects.qdoc doc/src/declarative/elements.qdoc doc/src/examples/qml-examples.qdoc
* | \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-9/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| * \ \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7David Boddie2011-03-221-1/+11
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/examples/qml-examples.qdoc
| * | Doc: Work on QGraphicsItem::ItemSceneChange/ItemSceneHasChangedGeir Vattekar2011-02-231-9/+11
| | | | | | | | | | | | Task-number: QTBUG-16900
* | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2011-03-171-0/+8
|\ \ \ | | |/ | |/| | | | | | | Conflicts: tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-staging into ↵Qt Continuous Integration System2011-03-161-0/+8
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-water-staging: Introduce QGraphicsItem::ItemStopsFocusHandling flag
| | * | Introduce QGraphicsItem::ItemStopsFocusHandling flagMichael Hasselmann2011-03-161-0/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When set for an item, QGraphicsScene will skip focus handling for this item and everything underneath it (including focus-out). Allows users to reimplement custom focus handling. Use case: touch devices that implement panning. Here, focus-in has to happen only if no panning was triggered. Analogous, no focus-out should happen when panning was detected. Fixes the alternative proposal ("black holes for focus changes") of QTBUG-16343: QGraphicsView doesn't support focus change on mouse release. The previous test was only testing one scenario, which didn't give a good idea whether the flag was actually working as intended. Task-number: QTBUG-17505 Reviewed-by: Yoann Lopes Reviewed-by: Jan-Arve Sæther
* | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2011-03-111-1/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-03-101-1/+3
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix QGraphicsScene returning incorrect focus item. Not requiring valid QTextBlock in previous()
| | * Fix QGraphicsScene returning incorrect focus item.Yoann Lopes2011-03-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the scene was losing and regaining focus, it was incorrectly setting the focus on any item that had its focus previously explicitly cleared. Autotest included. Task-number: QTBUG-16401 Reviewed-by: TrustMe
* | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-041-5/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/samegame/SamegameCore/samegame.js mkspecs/features/symbian/default_post.prf src/declarative/qml/qdeclarativeengine.cpp src/gui/text/qtextdocumentlayout.cpp src/plugins/plugins.pro src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/s60installs.pro tests/auto/declarative/declarative.pro tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp tests/auto/declarative/qmlvisual/qmlvisual.pro
| * | Don't crash when appending a null itemAaron Kennedy2011-01-271-5/+7
| |/ | | | | | | Task-number: QTBUG-16871
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-3/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Proper fix for QGraphicsItem crash.Yoann Lopes2011-01-131-3/+2
| | | | | | | | | | | | | | See 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 Task-number: QTBUG-16374 Reviewed-by: TrustMe
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Fixes crash in QGraphicsItem's destructor.Yoann Lopes2011-01-071-1/+3
| | | | | | | | | | | | | | | | Crash introduced by 783a278f243c6411f5f32d11f2165b9eed9b6f8c. Autotest written by Niklas Kurkisuo <ext-niklas.kurkisuo@nokia.com> Task-number: QTBUG-16374 Reviewed-by: TrustMe
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-131-7/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
| * Don't emit activeFocusChanged() unless the active focus actually changedTor Arne Vestbø2010-12-071-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would previously call subFocusItemChanged(0) on the item as part of clearing the subfocus, even if the item in question would recieve a new subfocus item as part of setting the new subfocus. This resulted in the declarative item emitting activeFocusChanged(false) and then activeFocusChanged(true), which was affecting any animation or state bound to the activeFocus property of the item. We now stop clearing the subfocus when encountering an item that we know will get subfocus during the set-subfocus pass. We then set subfocus all the way to the root item, since the subfocus item itself might change. The effect of this is that the declarative item will only get one call to subFocusItemChanged(), passing the new subfocus item, instead of two. This means the declarative item can keep track of wherther ot not it had a subfocus item previously, and only emit activeFocusChanged() when the active focus goes from true to false or false to true. Task-number: QTBUG-15615 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-251-8/+17
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * Further focus scope fixes.Michael Brasser2010-10-191-7/+12
| | | | | | | | | | | | Follow-up to e11ee40cefc981fbdcfb10816039d4efb080fb17. Reviewed-by: Yoann Lopes
| * Fixed QGraphicsItem to send ItemScenePositionHasChanged when appropriateJ-P Nurmi2010-10-181-1/+5
| | | | | | | | | | | | | | Task-number: QTBUG-13473 Merge-request: 812 Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-151-6/+10
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qpaintengine_raster.cpp tests/auto/declarative/qdeclarativetext/data/alignments_cb.png tests/auto/declarative/qdeclarativetext/data/alignments_cc.png tests/auto/declarative/qdeclarativetext/data/alignments_ct.png