summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Revert "Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition."Jonathan Liu2012-02-281-3/+7
| | | | | | | | | | | | | This reverts commit 7c0d15a22266a425c9e9ac0120d6774e120fe01e. The commit caused a regression whereby tooltips may be shown even if the mouse is not over the item if it has the Qt::ItemIgnoresTransformations flag and the QGraphicsView had been scaled. Task-number: QTBUG-17517 Task-number: QTBUG-22663 Change-Id: Ib7fd788d9712c5e659fe07182f9505a4eb135ab2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fixed DEBUG macro redefinition when compiling for WEC7 with MSVC.jaanttil2012-02-031-11/+11
| | | | | | | | | | DEBUG macro is defined from command line for debug builds in WEC7. Changed graphcisscene internal macro to have different name. Task-number: QTBUG-22512 Change-Id: I3d2bb8b7a2741fe34397a1c3cc268c1f6c5593b3 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* 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 - QGraphicsTextItem in a tab of QTabWidget cannot get focusKalle Viironen2011-09-151-1/+3
| | | | | | | | | | | | | | | Any QGraphicsTextItems in those tabs which are not the first tab of QTabWidget, cannot get focus although the tab is current tab of QTabWidget.But the QGraphicsTextItem in the first tab of QTabWidget can get focus. i.e. a focus frame (dotted box) appears around the QGraphicsTextItem. Those QGraphicsTextItems which cannot get focus can get focus only after the main window is minimized and then maximized. i.e. After that, a focus frame appears around it. Task-number: QTBUG-19680 Merge-request: 2676 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix a crash with QGraphicsScene.Pierre Rossi2011-07-121-1/+2
| | | | | | | | | | | | | | | | It happened when the scene gets deleted after ~QApplication has been called. test case: int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsScene *scene = new QGraphicsScene(&a); return 0; } Reviewed-by: Gabi
* 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
* | Notify a11y framework of FocusChanges for QGraphicsObjectJan-Arve Sæther2011-05-091-0/+12
|/ | | | | | (cherry picked from commit 1b5cb7865eb8b48a2721f9b9c3ccd2fb25f8175d) Reviewed-by: Frederik Gladhorn
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-071-3/+0
|\ | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm tests/auto/qdiriterator/tst_qdiriterator.cpp
| * QGraphicsItem::ItemStops[ClickFocusProgration|FocusHandling] must not ↵Michael Hasselmann2011-04-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | interfer with touch event propagation Both flags are only supposed to affect focus handling but not the regular touch event propagation. In this case, touch begin events were not propagated to any item beneath the one carrying those flags. Merge-request: 2588 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Draw graphics item bounding rects drawn when QT_DRAW_SCENE_ITEM_RECTS=1J-P Nurmi2011-04-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | It is extremely handy to visualize bounding rects when developing pixel perfect graphics view based applications. This change makes it possible to define an environment variable (inspired by QT_FLUSH_PAINT) to enable drawing of graphics items' bounding rects with random colors. Any graphics view/declarative example can be used to test the feature. Merge-request: 981 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2011-03-171-4/+13
|\ \ | |/ | | | | | | 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-4/+13
| |\ | | | | | | | | | | | | | | | | | | 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-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | 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-3/+8
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | 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-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-15/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-02-101-0/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Stop focus propagation of touch events when flag is set.
| | * | Stop focus propagation of touch events when flag is set.Niklas Kurkisuo2011-02-091-0/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | Added check to stop propagation of touch events for items that have the QGraphicsItem::ItemStopsClickFocusPropagation flag set. Merge-request: 1085 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2011-02-091-12/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix auto test failure. PathView regression: dragging the path didn't update currentIndex Fix docs for variant and list basic types Add test for importing plugins that contain QML files Call onAdd() for first items added to ListView and GridView Use same values for Text.lineHeightMode and QTextBlock::lineHeightMode from master. Don't clear pre-edit text when a graphics items loses focus.
| | * | Don't clear pre-edit text when a graphics items loses focus.Andrew den Exter2011-02-091-12/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't forceably reset the input method state when a graphics item loses focus, reset the input context and let it handle sending the appropriate events itself. That way behavior is consistent with QWidget and the input context can opt to commit its current pre-edit text instead of discarding it. And don't change the focus until after the input context has been reset or the input method events won't be delivered. Change-Id: Ic545bccab6bf671709c1d06d499217baf614e6f9 Task-number: QTBUG-16997 Reviewed-by: axis
| * | Doc: Fixed warnings and other problems found while fixing markup.David Boddie2011-02-071-3/+3
| |/
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-131-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | 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
| * Fixed DeviceCoordinateCache items when using QGraphicsScene::render().Samuel Rødal2010-12-091-2/+2
| | | | | | | | | | | | | | | | Since viewRect is null, we shouldn't try to use the partialCacheExposure path which intersects the viewRect with the device rect of the item. Task-number: QTBUG-15977 Reviewed-by: Bjørn Erik Nilsen
* | Fix transformIsSimple in QGraphicsSceneJørgen Lind2010-11-221-18/+1
| | | | | | | | | | | | The transformIsSimple was a bit to restrictive Reviewed-by: bnilsen
* | Make sure QGraphicsSceneHoverLeave event has non-null widget pointer.Denis Dzyubenko2010-10-191-7/+7
| | | | | | | | | | | | | | | | | | When constructing QGraphicsSceneHoverLeave event out of QEvent::Leave we should set the widget pointer to the graphicsview's viewport, th same as we do for other graphicsscene events like QGraphicsSceneMouseEvent. Reviewed-by: Yoann Lopes Reviewed-by: Bjørn Erik Nilsen
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-081-18/+58
|\ \ | |/
| * QGraphicsItem device coordinate cache unefficient in portrait modeBjørn Erik Nilsen2010-10-061-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that we always invalidated the cache whenever the item was rotated. This is however not required for simple rotations such as 90, 180 and 270 degrees. This commit also removes the somewhat arbitrary logic which takes the desktop size into account. We now use the viewport size instead. Auto test included. Task-number: QT-3779 Reviewed-by: yoann
* | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-051-1/+1
|\ \ | |/
| * Fix QTBUG-13730. QGraphicsScene::render clipping bug. Includes test case.Chris Meyer2010-10-041-1/+1
| | | | | | | | | | Merge-request: 2480 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-45/+81
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * QPainter not restored correctly in Graphics View.Bjørn Erik Nilsen2010-09-221-0/+2
| | | | | | | | | | | | | | | | | | World transform and opacity was sometimes not restored correctly after drawing items. Auto test included. Task-number: Discovered while working on QTBUG-12760
| * Setting QGraphicsItem::ItemClipsChildrenToShape forces ItemClipsToShapeBjørn Erik Nilsen2010-09-221-45/+79
| | | | | | | | | | | | | | | | | | | | | | | | Problem was that setting ItemClipsChildrenToShape on an item resulted in item itself being clipped to its own shape (ItemClipsToShape). This commit also reduces state changes on the painter and re-uses the clip whenever possible, which in turn means better performance for items that clip children to shape. Auto test included. Task-number: QTBUG-12760
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-5/+6
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Fixed compile warning on Windows.Kim Motoyoshi Kalland2010-09-201-1/+1
| | | | | | | | Reviewed-by: bnilsen
| * git Merge branch '4.7-upstream' into 4.7-docJesper Thomschutz2010-09-151-2/+3
| |\ | | | | | | | | | | | | Conflicts: src/gui/kernel/qgesturemanager.cpp
| | * QGraphicsWidget update issues with ItemHasNoContents + effectBjørn Erik Nilsen2010-09-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Items with the ItemHasNoContents flag set are never drawn so the 'paintedViewBoundingRect' is never cached/updated resulting in updates wrongly being discarded. The solution is to always invalidate the children for such items. Auto test included. Task-number: QT-3803
| * | Merge branch '4.7-upstream' into 4.7-docA-Team2010-09-131-1/+1
| |\ \ | | |/
| | * Assertion calledEmitUpdated fails in QGraphicsScene.Bjørn Erik Nilsen2010-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that the 'updateAll' boolean was reset to 'false' when it really should have been unchanged. This happened when rendering the scene from outside the view's paint event (i.e. from QGraphicsView/Scene::render). We only want to reset 'updateAll' when triggering drawItems() from QGraphicsView::paintEvent, i.e. when the 'view' pointer != 0. Broke after commit: dda8a57c. Auto test included. Task-number: QT-3674
| * | Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into doc-4.7Morten Engvoldsen2010-09-021-1/+1
| |\ \ | | |/ | |/|
| | * Fixed spelling, broken links, and missing default values.Jerome Pasion2010-08-301-1/+1
| | | | | | | | | | | | | | | Tasks: QTBUG-13271, QTBUG-13212, QTBUG-12321 Reviewer: David Boddie
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-301-14/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-271-7/+3
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (374 commits) Add a test for the QPen::brush() != Qt::NoBrush for a Qt::NoPen pen. Calling QPen::brush() on a Qt::NoPen pen, should return QBrush::NoBrush. use QFile:map instead of ::mmap Do not use global static const references to objects Revert "Refactor blend_transformed_bilinear to simplify the blend type checking" Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition. Refactor blend_transformed_bilinear to simplify the blend type checking Note RTL behavior changes in docs and changelog Implement qt_memfill32 with Neon. Implement the composition mode Plus with Neon. Fix the broken unicode detection of ODBC driver. Doc: Fixed qdoc warnings. Doc: updating getting started docs - not finished Make it possible again to build Qt without webkit Doc: fixing creator bugs, removing menus and textbox in the header Fixing qdoc index file...Commit hack to work around the massive amounts of dependencies in the upstream branch. Doc: Fixing overlapping text in header list Use Ctrl rather than Alt for switching tabs in the demo browser Doc: add link to new gettings started to index.html Doc: Fixing bug involving header misplacement in Creator style ...
| | * Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition.Bjørn Erik Nilsen2010-08-251-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old approach discovered a bug in QWidget::mapToGlobal in the context of lighthouse, which in turn brought our eyes to QGraphicsScenePrivate::itemsAtPosition. The implementation itself was correct, but we can easily remove the-not-so-cheap mapToGlobal call since we already have the scene position, which is all we need. This functionality is heavily tested by existing auto tests, and all of them pass. Reviewed-by: mae
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-251-7/+2
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (50 commits) Add the missing license headers to the QString benchmark data Fix building of qsimd.cpp on Windows CE Use QElapsedTimer for the benchlib tests. Properly implement the CPU feature disabling in qsimd.cpp. Report the detected CPU features in the corelib boilerplate Detect CPU features on ARM by reading the ELF auxvec. Split the CPU-detection code into multiple functions for readability Fixed delivering gestures to a toplevel widget. Unroll the SSSE3 code even more to avoid the need to keep an extra variable for inverting the result Don't try to compile the SSE2 and SSSE3 code with compilers that don't support them (e.g. ARM) Improve on the SSSE3 with alternate aligning function. Add the beginnings of a new SSSE3-based aligning algorithm Small fixup Update the SSSE3-with-alignment function to use aligned loads. Add an ucstrncmp that uses SSSE3 with aligning. Add an SSSE3 version of ucstrncmp Optimise the tail comparison of ucstrncmp Add a version of ucstrncmp with SSE2 with aligning. Add an SSE2-optimised version of ucstrncmp Add the ucstrncmp benchmarks ...