summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change to release license header.Jason McDonald2011-02-161-13/+13
| | | | Reviewed-by: Trust Me
* Proper fix for QGraphicsItem crash.Yoann Lopes2011-01-171-3/+2
| | | | | | | | See 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 Task-number: QTBUG-16374 Reviewed-by: TrustMe (cherry picked from commit 46ede046a34c822c612c55fdb1dc93dffe3fc6b6)
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | Reviewed-by: Trust Me (cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350)
* 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
* 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>
* 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>
* Don't give focus to a FocusScope that has had focus explicitly cleared.Michael Brasser2010-10-111-6/+10
| | | | | | | If focus was explicitly cleared on a non-visible FocusScope, and then it was made visible, it would incorrectly grab focus. Task-number: QTBUG-13380
* Doc: fix description of the expected behavior for QGraphicsItem::cursorPierre Rossi2010-10-061-1/+1
| | | | | | It was fixed for setCursor in 600ff0193c9bfac4d2b40960766002e8b81aca22. Reviewed-by: Alexis
* FocusOut even when QGraphicsItem gets hidden.Frederik Gladhorn2010-10-011-3/+5
| | | | | | | | If a parent QGraphicsItem becomes invisible, its child would not receive a focus out event. Review-by: Thierry Task-number: QTBUG-13916
* Add sendParentChangeNotification to QGraphicsItemMarco Bubke2010-09-301-3/+13
| | | | | | | Fixes crash in creator. If flag is true notifications are sent. It is important that positioners work correctly and don't leak. Reviewed-By: Alexis Menard
* QGraphicsItem::childrenBoundingRect behavior breaks ↵Bjørn Erik Nilsen2010-09-161-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsEffect::sourceBoundingRect(). Context: QGraphicsEffect::sourceBoundingRect() returns: item->boundingRect() | item->childrenBoundingRect(); Problem was that item->childrenBoundingRect() adjusted the children's bounding rect with the children's ancestor effects (child -> root item), which means the source bounding rect was bigger than needed. We should only account for effects downwards in the hierarchy. root (has effect) | item (has effect) | child | grandChild Auto test included. Task-number: QT-3633, QT-3828 Reviewed-by: samuel
* Wrong bounding rect returned by QGraphicsEffect::boundingRect().Bjørn Erik Nilsen2010-09-161-10/+8
| | | | | | | | | | | | | | Regression after: f5c5e20a Problem was that the cached bounding rect was never invalidated. We can also remove the cached bounding rect in QGraphicsEffectSource because QGraphicsItem::childrenBoundingRect now clips by default. This basically means partially reverting above commit and invalidate whenever ItemClipsChildrenToShape flag changes. Auto test included. Task-number: Discovered while investigating QT-3633 Reviewed-by: samuel
* Fix bug in 34b805d66c09fb324d1b6a7bcf259e8743ef3894Thomas Hartmann2010-09-151-2/+3
| | | | | | | This time the implementation of clear is correct Reviewed-by: Marco Bubke
* Completing the interface for children/data/resourcesThomas Hartmann2010-09-141-1/+8
| | | | | | | | This patch makes the handling of properties like children and data easier in Bauhaus. Especially in the case of property alias Reviewed-by: Aaron Kennedy
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-09-021-3/+0
|\
| * Minor performance improvement to QGraphicsItem::update.Bjørn Erik Nilsen2010-09-021-3/+0
| | | | | | | | | | | | | | | | Reported by other teams in Nokia. Avoid calling discardUpdateRequest() twice, first in update() and then in markDirty(). No-brainer. Task-number: QTBUG-10817 Reviewed-by: Trustme
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-09-011-24/+9
|\ \ | |/
| * Doc: Whitespace fixes.David Boddie2010-08-271-3/+3
| |
| * doc: Fixed numerous qdoc warnings.Martin Smith2010-08-271-27/+12
| |
* | Doc: Reworded a brief description for clarity.David Boddie2010-08-171-2/+2
|/ | | | Reviewed-by: Trust Me
* Merge remote branch 'origin/4.7' into oslo-staging-2/4.7Olivier Goffart2010-08-091-0/+15
|\ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/index.qdoc src/dbus/qdbusconnection.cpp src/gui/s60framework/qs60mainapplication.cpp src/gui/s60framework/qs60mainappui.cpp src/network/access/qnetworkrequest.cpp src/network/bearer/qnetworkconfiguration.h
| * doc: Fixed some qdoc errors.Martin Smith2010-08-061-0/+15
| |
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-08-061-0/+5
|\ \ | |/ | | | | | | Conflicts: src/declarative/util/qdeclarativeanimation.cpp
| * Make sure onFocusChanged is correctly emitted for items in a FocusScope.Michael Brasser2010-08-051-0/+5
| | | | | | | | | | Task-number: QTBUG-12649 Reviewed-by: Martin Jones
* | Doc: Fixed qdoc warnings.David Boddie2010-08-051-0/+18
|/ | | | Reviewed-by: Trust Me
* Fixed spelling mistakes in documented functions, classes, etc. Part of ↵Jerome Pasion2010-07-291-3/+3
| | | | QTBUG-11938 and QTBUG-10801
* Check the gesturemanager pointer before accessing it.Denis Dzyubenko2010-07-271-3/+4
| | | | | | | | This fixes a crash when a static QWidget is destroyed after the QApplication object. Task-number: QTBUG-12025 Reviewed-by: Zeno Albisser
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-231-0/+1
|\ | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: qdoc: Cleaned up the TOC for QML element pages. qdoc: Cleaned up the Inherits and Inherited by lines for QML elements. doc: Added missing \since 4.7 to effect propertyu.
| * doc: Added missing \since 4.7 to effect propertyu.Martin Smith2010-07-231-0/+1
| | | | | | | | Task-number: QTBUG-12132
* | QML focus API updates.Michael Brasser2010-07-211-0/+12
|/ | | | | | | | | The wantsFocus property has been renamed to activeFocus, to better reflect its value. Reading and writing the focus property is also now consistent -- this property represents focus within a scope. Other small changes were made to keep things consistent with the new naming. Reviewed-by: Aaron Kennedy
* Merge remote branch 'origin/4.7' into 4.7-from-4.6Rohan McGovern2010-07-171-1/+2
|\ | | | | | | | | Conflicts: tests/auto/qtexttable/tst_qtexttable.cpp
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-141-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (83 commits) Crash while runnig tst_QMdiSubWindow::emittingOfSignals test on Cocoa fix qconfig.h aliased header creation fix warning directive on gnuc qdoc: Removed navigation arrow that was causing display problems. Silence warning when building with MSVC 2005 Fix an Assert in QTextTable Revert "Fix an Assert in QTextTable" Attempt to fix build failure with msvc200{5,8} on Windows XP. fix macx not having UNICODE in DEFINES any more doc: Fixed several qdoc warnings. Fix an Assert in QTextTable doc: Fixed several qdoc warnings. QSslSocket: Improve error handling qdoc: Fixed several <div> elements that had the "/>" ending. QSslSocket: fix documentation for QSslSocket::setPeerVerifyMode() qdoc: Fixed breadcrumbs for QML examples. remove redundand translations project files make projects lupdate-friendly Timing fix for slow devices. QNAM: Add future enum attribute for Zerocopy QNAM ...
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-101-1/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (59 commits) Doc: Cleaning style and adding support for Creator Add NTLMv2 authentication support to QAuthenticator. QIODPLB: Sync behavior of ungetBlock() and ungetChar() QFileIconProvider: Load icons on demand. Doc: fixing offline style Fix handling of SSL certificates with wildcard domain names Doc: fixing examples link doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. SSL library loading: load system libs only once Revert "SSL backend: load libraries for certificates only once" doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. Doc: Adding support for Qt Creator style doc: Fixed last of the declarative/QML qdoc warnings. qdoc: Marked some missing declarative properties and functions as \internal. qhelpgenerator: Fix namespace syntax checking. ...
| | | * doc: Fixed several qdoc warnings.Martin Smith2010-07-091-1/+2
| | | |
* | | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-07-151-3/+24
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/page/FrameView.h src/3rdparty/webkit/WebCore/platform/ScrollView.cpp src/3rdparty/webkit/WebCore/platform/ScrollView.h src/corelib/plugin/quuid.cpp src/gui/dialogs/qfontdialog.cpp src/multimedia/audio/qaudiodevicefactory.cpp src/opengl/qgl.cpp src/openvg/qpaintengine_vg.cpp tests/auto/qxmlquery/tst_qxmlquery.cpp
| * | | Fixed missing clip when computing the graphics item effect source rect.Samuel Rødal2010-07-021-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If item clips children to shape we should take that into account when computing the source rect, to avoid creating unnecessary large source pixmaps which might have a significant performance impact. Task-number: QT-3551 Reviewed-by: Gunnar Reviewed-by: Trond
* | | | Fixes QGraphicsItem::focusItem() returning incorrect value.Yoann Lopes2010-07-131-2/+4
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting focus on an item, subfocus chain was previously updated only for items with a common ancestor. We now make sure that this chain is updated also for the previously focused item (possibly not sharing any common ancestor with the newly focused item). Autotest included. Task-number: QTBUG-12112 Reviewed-by: Alexis Ménard <alexis.menard@nokia.com>
* | | Fix subfocus when reparenting panels.Andreas Aardal Hanssen2010-07-081-0/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reparenting an item into another, QGraphicsItem will fix the subfocus chain by first removing subfocus from the previous ancestors, and then optionally restoring the subfocus chain to the new ancestors of the reparented item. This allows item trees to be created and assigned a specific focus item before even added to a scene. The QGraphicsItemPrivate::setSubFocus function did not take into account that the root item might be in a different panel than the reparented item, which is the case when reparenting one panel into another. If so, setSubFocus must not mess up the new ancestor panel's sub focus chain. Otherwise (former behavior), the new ancestor panel's focusItem will point to the reparented panel's focus item. This in turn breaks an invariant; one panel's focusItem can never point to an item in another panel. The bundled test case shows this point: Create two panels that each have one child that sets focus. The first panel is added to the scene just to prepare, and verify that it's activated as expected, and its focus child immediately gains input focus. Then we create a second panel, which also has a focus child (but it doesn't have focus as its panel is not active). When we reparent the new panel onto the old one, we expect the new panel to be activated, and the child focus item to gain input focus. However, we also expect the parent panel's focus item to remain intact, so that when we hide the child panel, and the parent panel is reactivated, its original focus item regains focus. Former behavior was that the parent's focus item still pointed to the child panel focus item. This change only has effect when reparenting to or from a panel. Merge-request: 735 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-011-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (51 commits) Symbian on Linux: $QTDIR/bin is not necessarily in the path. Updated Symbian def files with new EGL exports. Added another missing EGL stub. Fixed compilation on Symbian. Added missing EGL stub function. Got rid of unused variable compiler warning. QGLWindowSurface support for partial updates via EGL_NOK_swap_region2 Adding func prototypes for EGL_NOK_swap_region2 extension. Check for EGLSurface leak only when paint device is a QGLWidget. Fixed bug in drawTiledPixmap when width of pixmap matches target rect. Update def files for symbian Improved performance of 16 bit memrotates using NEON instructions. Use built-in iconv on Solaris if available Export various symbols needed to make a custom GL graphicssystem. Moc: fix compilation when templated types with multiple arguments are used. Fixes the documentation of QGraphicsEffect::update(). support BGRA textures on SGX Avoid calling time.elapsed() twice in abstract animation Adds slowdownFactor to UnifiedTimer in abstract animation Add the conversion in-place for QPixmap::fromImageReader() on raster. ...
| * | Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation.Bjørn Erik Nilsen2010-06-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag allows you to create a non-focusable item that can be clicked on without changing the focus. This is also possible to achieve by using focus scopes / panels, however the implementation is then way more complex. Thew new flag is tailored for simple uses cases where you simply want to stop the propagation and nothing more. Auto test included. Task-number: QT-3499 Reviewed-by: yoann
* | | Ensure micro focus is updated in TextEdit and TextInputMartin Jones2010-06-291-4/+7
|/ / | | | | | | Task-number: QTBUG-11552
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7David Boddie2010-06-181-1/+2
|\ \
| * | clearFocus() shouldn't mess with focus if it doesn't have focusMartin Jones2010-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | removing an item from the view caused the focus to change even if the removed item didn't have focus. Task-number: QTBUG-11341 Reviewed-by: Yoann Lopes
* | | Doc: Fixed documentation errors.David Boddie2010-06-181-1/+1
|/ / | | | | | | Reviewed-by: Trust Me
* | Add a new qconfig feature GESTURESTasuku Suzuki2010-06-021-0/+5
| | | | | | | | | | Merge-request: 535 Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
* | Don't remove the pixmap from cache when not modifying it.Andreas Aardal Hanssen2010-06-011-2/+4
| | | | | | | | | | | | | | | | Fixes one minor regression in the last commit to QGraphicsIten::scroll: if the expose region doesn't intersect with the cache pixmap, then there's no point in removing it. Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Fix bug in QGraphicsItem::scroll() when called with no QRectF argument.Andreas Aardal Hanssen2010-06-011-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With a null rect argument, QGraphicsItem::scroll() is supposed to scroll the whole item. When using ItemCoordinateCache, currently the only supported mode for scroll optimization, we simple scrolled the whole cache pixmap. Problem: The cache pixmap has a border of 2 pixels. So we scroll the contents _and_ the border. This leaves white/transparent horizontal and vertical line artifacts when scrolling. This change unifies the two cases - partial and full scrolling - into one (shorter) approach that works without scrolling the margin as well. Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Avoid unnecessary detach / deep copy in QGraphicsItem::scroll().Andreas Aardal Hanssen2010-06-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::scroll() scrolls the cache pixmap when cacheMode is enabled (for ItemCoordinateCache only). Because the pixmap exists both in the cache and in a temp QPixmap copy, the ref count is 2, so the scroll operation has to do a deep copy. To avoid this, we remove the pixmap from the cache before and reinsert it again after calling QPixmap::scroll(). Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Wrong QGraphicsItem::childrenBoundingRect() when applying effects.Bjørn Erik Nilsen2010-05-271-3/+3
| | | | | | | | | | | | | | | | | | Problem was that we used the children's raw bounding rect instead of using their effective bounding rect when calculating the bounds. Auto test included. Task-number: QTBUG-10756