summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-292-48/+48
| | | | | | | | 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>
* Update contact information in license headers.Sergio Ahumada2012-08-012-4/+4
| | | | | | | | | | | | | - 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 sizing in QGraphicsView itemsAtPosition auto testJonathan Liu2012-03-051-0/+1
| | | | | | | | | | The auto test may fail incorrectly depending on the width of the QGraphicsView frame. To ensure more consistent test results, the frame is disabled. Change-Id: I8d70fb07e45803230954f776947d525e4cf9050f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> (cherry picked from commit b2fb578a115f554ec7a00558978e5532a2ac855a)
* Add additional QGraphicsView tests for regressionJonathan Liu2012-02-281-0/+61
| | | | | | | | | | Add additional tests for graphics view tooltip regression introduced by 7c0d15a22266a425c9e9ac0120d6774e120fe01e. Task-number: QTBUG-17517 Task-number: QTBUG-22663 Change-Id: I5e0d0e19504730a3e14ac84712a366dbebe688e6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update year in Nokia copyright messages.Jason McDonald2012-01-112-2/+2
| | | | | | | | | 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>
* tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-281-0/+2
| | | | | | | | | | Marking a test with CONFIG+=insignificant_test will cause the exit code of the test to be discarded during `make check'. This is intended to be used for tests which are valuable to run, but are known to be unstable and are not feasible to immediately fix. Change-Id: Id7b2407d0a13c8de19a58badb78fa7c018c9b50a Reviewed-by: Jo Asplin
* Doc: Fixing typoSergio Ahumada2011-06-301-1/+1
|
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-132-34/+34
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-101-2/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix auto test failure.Andrew den Exter2011-02-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow the input context to be reset twice. The context is reset because of two events, the first is because an item lost focus and that reset needs to occur before the focus moves away from the item or events won't be delivered to it. The second redundant reset is because the Qt::WA_InputMethodEnabled flag was cleared on the view widget because no item has focus and it has no way to know the context doesn't need to be reset. Change-Id: Ie3b3fc6898d144ed3f8b3822e49ea0eee7e029f4 Reviewed-by: Martin Jones
* | Cocoa: fix qgraphicsview autotestRichard Moe Gustavsen2011-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Moving the cursor to the corner of the desktop (0, 0) will typically trigger things to happend in the OS, at least on Mac (spaces, synergy etc). So I changed those tests to move it to (1, 1) instead. The reason to move it to (0, 0) was just to get the mouse away from the window anyway. And second, it takes some time after using QCursor::setPos on Mac before the events from the move actually arrive. And many tests that use this function relies on this. So I introduces a little delay. This alone will fix a couble of tests.
* | Cocoa: fix autotest, qgraphicsview::moveItemWhileScrollingRichard Moe Gustavsen2011-01-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This test reveals a real bug when updating and scrolling at the same time in graphicsview. The problem is that the scroll will issue an update to cocoa that gets handled before already queued Qt events. This means that the viewport of graphicsview will receive a paintevent, and clear dirtyScrollOffset, before the posted call to _q_processDirtyItems is executed. This means that we 'loose' the scrolling information upon painting. I discussed this problem with Bjørn Erik, and he had strong opinions about this promblem not worthwhile fixing. The raster engine is anyway about to be default on Mac, and there the problem will not exist.
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-172-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-201-0/+39
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/plugins/phonon/mmf/mmf.pro src/s60installs/s60installs.pro tests/auto/qapplication/test/test.pro tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * Fix failing tst_QGraphicsView::QTBUG_16063_microFocusRect auto-testGabriel de Dietrich2010-12-141-2/+2
| | | | | | | | | | | | This ammends commit 0af1f5508e165f3b494ab236cb1cdf1b0edcffa5. Reviewed-by: trust me
| * Fixes text jitter in QtQuick components when using the virtual keyboardGabriel de Dietrich2010-12-131-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsView::mapFromScene() returns a QRect instead of a QRectF. Thus, we were prematurely rounding the micro focus rectangle coordinates in QGraphicsView::inputMethodQuery(). (The Qt::ImMicroFocus query returns a QRectF from QGraphicsScene, which is the result of querying QDeclarativeTextEdit and mapping it to the scene.) Auto-test included. Reviewed-by: leo Reviewed-by: bnilsen Task-number: QTCOMPONENTS-288 Task-number: QTBUG-16063
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-051-46/+102
|\ \ | |/ | | | | | | | | Conflicts: mkspecs/features/symbian/symbian_building.prf src/network/access/qhttpnetworkconnectionchannel.cpp
| * Fixed QGraphicsView autotest to use a dummy toplevel widgetDominik Holland2010-11-021-46/+102
| | | | | | | | Fixed some conversion problems using qreal
* | Fixed a newly added autotest for QGraphicsView hover_leave.Denis Dzyubenko2010-10-221-1/+1
| | | | | | | | | | This should fix autotests regression on all platforms. There was a very silly typo in the test.
* | Make sure QGraphicsSceneHoverLeave event has non-null widget pointer.Denis Dzyubenko2010-10-191-0/+55
|/ | | | | | | | | 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
* QPainter not restored correctly in Graphics View.Bjørn Erik Nilsen2010-09-221-5/+43
| | | | | | | | | World transform and opacity was sometimes not restored correctly after drawing items. Auto test included. Task-number: Discovered while working on QTBUG-12760
* QGraphicsView: fix few artefacts that can appear if the changed() signal is ↵Olivier Goffart2010-08-201-10/+30
| | | | | | connected. Reviewed-by: bnilsen
* QGraphicsItem: Animation leaves drawing artifacts when clipping is used.Bjørn Erik Nilsen2010-07-201-0/+73
| | | | | | | | | | | | | | | | | This only happens when the ItemHasNoContents and ItemClipsChildrenToShape flags are set. Problem is that items with no content are threated as 'dummy' items, which means they are never drawn or 'processed' otherwise, so the cached bounding rect is not reliable/usable. This means that in case of changing the geometry of such items, its children always have to take care of invalidating the occupied areas and the update can not be clipped to the item's bounding rect. Regression after commit: c1c7dbf2 Auto test included. Task-number: QTBUG-11504 Reviewed-by: yoann
* Performance issue with QGraphicsItem::ItemClipsChildrenToShape.Bjørn Erik Nilsen2010-05-051-0/+57
| | | | | | | | | | | | | If the child rect is bigger than the parent rect and parent has the ItemClipsChildrenToShape flag set, then by updating the child, the whole child rect is marked as dirty, resulting in a much larger update area than required. This has a major impact on performance in Orbit/HB, where e.g. item-views typically consist of a container item that clips its children/items to shape. See attached video in QTBUG-9024. Auto test included. Task-number: QTBUG-9024
* QGraphicsView drawing artifacts due to rounding errors.Bjørn Erik Nilsen2010-05-031-15/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found during investigation of QTBUG-8820, and clearly visible in examples/graphicsview/diagramscene when slowly moving an item out of the viewport (left and top edge). Caused by two problems: 1) Using QRectF::toRect() instead of QRectF::toAlignedRect(). 2) Didn't adjust the item's bounding rect properly in drawSubtree(). QRectF::toRect() is completely useless since all the coordinates are rounded to the nearest integer. E.g. QRectF(-0.4, -0.4, 10.4, 10.4).toRect() -> QRect(0, 0, 10, 10), whereas toAlignedRect() returns QRect(-1, -1, 11, 11). Then when we have a proper aligned rect, we have to adjust it by 2 pixels in all directions (or 1 pixel in case of QGraphicsView::DontAdjustForAntialiasing). At first glance this adjustment seems too much, since one would assume adjusing the QRectF by 0.5 before using toAlignedRect() would be sufficient. That's sufficient in an untransformed world with pens using BevelJoin. However, the story is completely different as soon as the world is transformed or the pens use a different join. It's basically complicated (in some cases impossible) to calculate a pixel perfect aligned QRect, so instead we adjust by the amount of pixels required in the worst case. This commit also includes some optimizations for QRegion updates (since I anyways had to change the code). There's no point in using QRegion granularity if the viewport update mode is either FullViewportUpdate or BoundingRectViewportUpdate. Auto tests adjusted and new ones included. Task-number: QTBUG-10338
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-011-2/+24
|\
| * Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.Jan-Arve Sæther2010-04-291-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When focusInEvent is called we need to ensure that WA_InputMethodEnabled is set, since FocusInEvent might lead to that QInputContext::setFocusWidget is called (with the QGraphicsView as the widget parameter). However, if the widget still does not have WA_InputMethodEnabled set yet it will assert in QInputContext::setFocusWidget (it requires that the widget has the flag set). This was a problem for the morbit bridge, where Dui requires the attribute to be set (while Orbit actually does not require) Task-number: QTBUG-10276 Reviewed-by: jasplin Reviewed-by: Alexis Menard
* | Fixes wrong QGraphicsView's viewport cursor reset.Yoann Lopes2010-04-211-0/+28
|/ | | | | | | | The cursor was reset even when it had not been previously saved. Autotest included. Task-number: QTBUG-7438 Reviewed-by: bnilsen
* Fixes wrong composition mode for cached backgrounds in Graphics View.Bjørn Erik Nilsen2010-03-031-0/+34
| | | | | | | | | | | This change partially reverts commit a589005f and therefore fully reverts 68be6457. We cannot assume that only opaque pixels are painted in drawBackground(). Regression against 4.5. Auto-test included. Task-number: QTBUG-8168 Reviewed-by: trond
* GV: Update issues if drawItems() is overridden and IndirectPainting is used.Bjørn Erik Nilsen2010-02-241-0/+26
| | | | | | | | | | | | | Problem was that the cached view bounding rect was never updated when overriding QGraphicsScene::drawItems or QGraphicsView::drawItems, without calling the base class implementation. The same for 'updateAll' boolean. We also have to make sure there are no unpolished items before we draw. Regression against 4.5. Auto-test included. Task-number: QTBUG-7880 Reviewed-by: yoann
* Update copyright year to 2010Jason McDonald2010-01-062-2/+2
| | | | Reviewed-by: Trust Me
* Fixes bug when using AnchorUnderMouse for GraphicsView transformation.Yoann Lopes2009-12-181-0/+97
| | | | | | | | | | | We now automatically enable mouse tracking on the viewport of the GraphicsView when setting AnchorUnderMouse as transformationAnchor or resizeAnchor. Autotest included. Task-number: QTBUG-6835 Reviewed-by: bnilsen
* Fixed qgraphicsview autotest build for winscw.Miikka Heikkinen2009-12-151-10/+10
| | | | | | | NokiaX86 compiler doesn't like QCOMPAREs unless the compared pointers are cast correctly. Reviewed-by: Janne Anttila
* Fixes painting issues when scaling a QGraphicsView.Yoann Lopes2009-11-201-0/+39
| | | | | | | | | The problem was that the 'exposed rectangle' passed to the Item's paint() function was rounded to Int values, whereas the one passed to drawBackground and drawForeground was not. Autotest included. Task-number: QTBUG-5859 Reviewed-by: bnilsen
* Fix tst_QGraphicsView::inputMethodSensitivity autotestOlivier Goffart2009-11-171-0/+9
| | | | | | | | | The problem was that the scene was not notified it lost the focus when it was disconnected from the view (with setScene) So when it got back the focus, nothing was updated because the scene thought it still had the focus. Reviewed-by: jasplin
* Revert "Always set a clip on the painter in QGraphicsView."Andreas Aardal Hanssen2009-11-111-72/+0
| | | | | | | | | This reverts commit 4bf7f90a27377f439e86d6175e5e3cdebd131be0. The change is already reverted in kinetic-declarativeui. Reviewed-by: Warwick Allison Reviewed-by: bnilsen
* Always set a clip on the painter in QGraphicsView.Andreas Aardal Hanssen2009-11-051-0/+72
| | | | | | | | | | | | | | | | | | | | This allows items to check painter->clipRegion() to find out what the imposed clip is, in order to cull elements that don't need to be painted. This is an alternative approach to getting the same information from QStyleOptionGraphicsItem::exposedRect. It's better because it's a pull operation, but it's slightly worse because it doesn't include the complete system clip, and because QRegion has integer resolution only (whereas QGraphicsItem's coordinate uses qreal. A better approach may be to access QPainter's combined clip region; this option is open for future versions of Qt. Original patch by Warwick (which is why he's on reviewed-by), but the patch was modified to operate in device instead of logical coordinates. Reviewed-by: jasplin Reviewed-by: Warwick Allison
* Merge commit 'widget/4.6' into origin/4.6Olivier Goffart2009-10-301-0/+53
|\ | | | | | | | | Conflicts: src/gui/effects/qgraphicseffect.cpp
| * Stabilize tst_QGraphicsView::optimizationFlags_dontSavePainterState2Bjørn Erik Nilsen2009-10-281-2/+6
| | | | | | | | | | Make sure the view is painted, otherwise the transforms are identity and comparisons don't make sense.
| * Wrong worldTransform() on the painter in QGraphicsScene::drawForeground.Bjørn Erik Nilsen2009-10-231-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The painter's worldTransform() is updated for each item we draw, and when the DontSavePainterState optimization flag is set, this change is not protected by save() and restore(). After all the items are drawn, it means the painter is left with the last drawn item's transform. We therefore have to make sure it is reset back to whatever it was before the items were drawn. Auto-test included. Task-number: QTBUG-4973 Reviewed-by: alexis Reviewed-by: andreas
* | Change all valid Task-Tracker references to bugreports.qt.nokia.com reference.Warwick Allison2009-10-291-1/+1
|/
* Test fixes for Windows Mobile.ninerider2009-10-202-96/+120
| | | | | | | | Accounting for double resolution devices on Windows Mobile in the test data sets (tst_qgraphicsview_2.cpp). Skipped a test involving mouse tracking (tst_qgraphicsview.cpp). Reviewed-by: Joerg
* Fix graphicsview test on Cocoa.Olivier Goffart2009-10-131-1/+5
| | | | | | | | | | Cocoa doesn't support regions update and always update the bounding rect (see comment in QWidgetPrivate::update_sys in qwidget_mac.cpp) Change tests that checked that we get the exact regions. Reviewed-by: MortenS
* QGraphicsView tests on X11Olivier Goffart2009-10-121-1/+1
|
* Fix GraphicsView test on macOlivier Goffart2009-10-121-1/+7
| | | | On mac, we always get full update.
* GraphicsView tests on macOlivier Goffart2009-10-121-2/+4
| | | | When a widget is shown we get two paint avent on Mac
* Merge commit 'origin/4.5' into 4.6Joerg Bornemann2009-10-061-0/+1
|\ | | | | | | | | Conflicts: tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * tst_QGraphicsView::task245469_itemsAtPointWithClip Windows mobile fixJoerg Bornemann2009-10-061-0/+1
| | | | | | | | | | | | | | | | We must make sure that the graphics view scene is centered to make this test work. On Windows mobile, the widget was too wide and the scene wasn't centered. Reviewed-by: thartman
* | Stabilize tests on X11Olivier Goffart2009-10-051-7/+5
| |