summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-08-191-6/+6
|\ | | | | | | | | Conflicts: tests/auto/auto.pro
| * QGraphicsView test fixGabriel de Dietrich2009-08-181-6/+6
| | | | | | | | Reviewed-by: Olivier
* | Merge commit 'qt/master'Jason Barron2009-08-181-0/+37
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples.qdoc doc/src/plugins-howto.qdoc doc/src/topics.qdoc examples/phonon/musicplayer/mainwindow.cpp src/3rdparty/freetype/src/base/ftobjs.c src/corelib/global/qglobal.h src/corelib/tools/qalgorithms.h src/corelib/tools/qshareddata.cpp src/corelib/tools/qsharedpointer.cpp src/corelib/tools/tools.pri src/corelib/xml/qxmlstream.h src/gui/painting/painting.pri src/gui/widgets/qdatetimeedit.cpp tests/auto/qdesktopservices/qdesktopservices.pro tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qtextcodec/test/test.pro
| * Transforms do not obey AnchorUnderMouse with viewport margins setGabriel de Dietrich2009-08-171-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | setTransformationAnchor(QGraphicsView::AnchorUnderMouse) would not work properly if viewport margins were set. When centering the view in QGraphicsViewPrivate::centerView, the viewport margins were not being taken into account. Mapping from global cursor coordinates in the viewport instead of the view fixes the issue. Task-number: 255529 Reviewed-by: Olivier
* | Fixed tst_QGraphicsView::scrollBarRanges autotest for Symbian.Janne Anttila2009-08-141-1/+1
| | | | | | | | | | | | The scrollBarRanges test case is style specific, but we were using s60 style to run the test. Added Q_OS_SYMBIAN ifdef to enable windows style for this particular test case.
* | Merge commit 'qt/master'Jason Barron2009-08-132-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * Update contact URL in license headers.Jason McDonald2009-08-122-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Make graphicsview autotest compile for SymbianMiikka Heikkinen2009-08-101-3/+9
| |
* | Merge commit 'qt/master-stable'Jason Barron2009-07-281-0/+5
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/io/io.pri src/corelib/io/qfilesystemwatcher.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/configure/configureapp.cpp
| * No link-errors when building from repositoryVolker Hilsheimer2009-07-251-0/+5
| |
* | Merge commit 'qt/master-stable'Jason Barron2009-07-271-20/+252
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
| * Make Graphics View auto-tests less dependant on WS.Bjørn Erik Nilsen2009-07-151-8/+10
| | | | | | | | | | | | | | Several auto-tests failed on the Mac because the view get two paint events on the first show. This is a bug in QWidget, but shouldn't make graphics view auto-tests fail. Also, there's no difference between update() and repaint() on the Mac.
| * Stabilize tst_QGraphicsView::mouseTracking2 (on Windows).Bjoern Erik Nilsen2009-07-131-1/+3
| | | | | | | | | | | | | | Use QApplication::sendEvent directly instead of calling the static sendMouseMove function, which also calls QTest::mouseMove. This test failed with spy.count() being 2 instead of 1 (which is correct since we both use QTest::mouseMove and QApplication::sendEvent).
| * Merge commit 'qt/master' into graphicssceneindexBjørn Erik Nilsen2009-07-101-0/+119
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| | * Improved the support for input methods in Graphics View.jasplin2009-07-031-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the graphics view support for input methods in several ways: * A new ItemAcceptsInputMethod flag is introduced to serve the same purpose for graphics items as WA_InputMethodEnabled does for widgets: Input method support can be controlled individually for each item. * The input method sensitivity of a view (i.e. the value of the WA_InputMethodEnabled flag) is updated dynamically whenever the input method support of the current focus item may change. * Input contexts are reset whenever an item that supports input methods loses focus. Reviewed-by: janarve Task-number: 254492
| * | Optimize QGraphicsViewPrivate::updateRect/updateRegion.Bjørn Erik Nilsen2009-07-081-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can do QRect::intersects/contains/operator| faster than QRect because we can assume the rects are normalized. Another important factor is our knowledge about the viewport rect, which is always QRect(0, 0, viewport->width(), viewport->height()). Auto-tests included.
| * | Fix broken tst_QGraphicsView::embeddedViews.Bjørn Erik Nilsen2009-06-301-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | This test has been broken after 32f32ee3e752a6cc03505ddaa48d2849eaedc2a6, but the test continued to pass because another bug, which is fixed by 6ee3fb750377eeedf161d96fef02c5fa336810e9. The transform should be exactly the same in both cases.
| * | Stabilize tst_QGraphicsView::moveItemWhileScrolling.Bjørn Erik Nilsen2009-06-251-1/+1
| | |
| * | More work on getting autotests to pass.Andreas Aardal Hanssen2009-06-231-0/+1
| | |
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Alexis Menard2009-06-172-4/+4
| |\ \ | | |/ | | | | | | qt-main/qgraphicssceneindex
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Alexis Menard2009-06-161-0/+97
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-main/qgraphicssceneindex Conflicts: src/gui/graphicsview/graphicsview.pri src/gui/graphicsview/qgraphicsitem.cpp
| * \ \ Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Alexis Menard2009-06-111-0/+59
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-main/qgraphicssceneindex Painfull merge due to recent changes in QGV framework. Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicsscene.h src/gui/graphicsview/qgraphicsscene_p.h src/gui/graphicsview/qgraphicsview.cpp
| * | | | Fix doc and auto-test regression.Alexis Menard2009-06-041-1/+1
| | | | |
| * | | | Remove the sorting cache from the QGraphicsScene and move it to the BSP.Alexis Menard2009-06-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Now the QGraphicsScene has no idea how works the index. So we can improve it separatly, add new ones and benchmarks existing ones.
* | | | | Merge commit 'qt/master-stable' into 4.6-mergedJason Barron2009-06-302-4/+4
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore configure.exe src/corelib/concurrent/qtconcurrentthreadengine.h src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicssceneevent.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_p.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qwidget.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkaccesshttpbackend.cpp tests/auto/network-settings.h tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro tests/auto/qvariant/tst_qvariant.cpp
| * | | | Merge license header changes from 4.5Volker Hilsheimer2009-06-162-4/+4
| |\ \ \ \ | | |_|_|/ | |/| | |
| | * | | Update license headers as requested by the marketing department.Jason McDonald2009-06-162-4/+4
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | | Merge commit 'qt/master-stable' into 4.6-stableJason Barron2009-06-251-13/+325
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 4.6 into the Qt-S60 repo. Conflicts: configure.exe mkspecs/features/qttest_p4.prf qmake/generators/makefile.cpp src/corelib/io/qdir.cpp src/corelib/io/qprocess.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qobject.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/corelib/thread/qthread_p.h src/corelib/tools/qvector.h src/gui/dialogs/qdialog.cpp src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qmessagebox.cpp src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsview.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/painting/qdrawhelper.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qmenubar.cpp src/network/socket/qlocalserver.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qitemdelegate/tst_qitemdelegate.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qpixmap/qpixmap.pro
| * | | | QGraphicsItems are repainted when outside the view's exposed region.Bjørn Erik Nilsen2009-06-121-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that we used QRect::isEmpty() on the item's bounding rect intersected with the exposed region's bounding rect as a criteria for whether the item should be drawn or not. This does not work as expected with partial updates, where the boundingRect() of the exposed region easily can cover the entire viewport area. The item should *only* be drawn if its bounding rect intersects with the exposed region (and not the exposed region's bounding rect). Auto-test included.
| * | | | Painting artifacts in QGraphicsView.Bjørn Erik Nilsen2009-06-111-0/+63
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem appears in the chip demo when clicking an item while scrolling the view using the mouse wheel. The problem was that we didn't translate the the item's old painted view rect. There was also a problem when enabling the DontAdjustForAntialiasing flag, causing an item to not redraw its edges. We have to adjust the rectangle by (-1, -1, 1, 1) since QRect() and QRectF() behaves differently. Auto-test (made by Andreas) included. Reviewed-by: Andreas
| * | | Fix QGraphicsView::render() regression, ensure the right device is passed.Andreas Aardal Hanssen2009-06-091-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass the viewport widget as the widget pointer when rendering to an arbitrary painter (e.g., onto a pixmap), we confuse the rendering functions to thinking that it's the viewport's region we should render into. So instead, when drawItems() is passed a painter that's different from the view, we pass 0 for the widget.
| * | | Fix tst_QGraphicsView::acceptMousePressEvent (by entering event loop).Andreas Aardal Hanssen2009-06-091-0/+2
| | |/ | |/| | | | | | | | | | This is necessary after we made the sceneRect grow lazily when it's not assigned.
| * | Graphics View Optimization: Use a simple style option by default.Bjoern Erik Nilsen2009-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleOptionGraphicsItem extends QStyleOption with three values: 1) matrix, 2) levelOfDetail, 3) exposedRect, and they all involve expensive QTranform operations when calculated. We pass style option(s) to drawItems() and paint(), but the extended values are usually not in use. We can therefore gain quite some nice speedup by making them opt-in with the QGraphicsItem::ItemUsesExtendedStyleOption flag. Additionally, QStyleOptionGraphicsItem::levelOfDetail has been obsoleted, and a new function QStyleOptionGraphicsItem:: levelOfDetailFromTransform(const QTransform &) has been added. Me and Andreas don't consider this change to be too controversial even though it changes the behavior. Auto tests still pass. Reviewed-by: Andreas
| * | Merge branch '4.5'Thiago Macieira2009-05-131-0/+24
| |\ \ | | |/ | | | | | | | | | Conflicts: tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * | Partially revert 37c72476fc444d3089075473cb4e9aa42ed64694Bjoern Erik Nilsen2009-05-051-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that mouse move events were not forwarded to the scene when mouse tracking was explicitly enabled on the view. Mouse tracking is disabled by default unless the scene contains an item that accepts hover events or has a cursor set. A mouse move event can only occur if: 1) a mouse button is pressed while moving the mouse 2) mouse tracking is enabled That means the part I've reverted was only hitting when mouse tracking was explicitly enabled, which is wrong. We always have to forward mouse move events to the scene if the view is getting them in the first place. Auto test included. Reviewed-by: Andreas
| * | Fix QGraphicsView::mapToScene(QRect) to avoid extra adjustments.Andreas Aardal Hanssen2009-04-171-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QGraphicsView::mapToScene(QRect) function assumes that QRect and QRectF share semantics for ::bottomRight(). However, since QRect follows Qt 3 semantics (the rect is based on viewport pixels and (0,0,1,1) is equivalent to one pixel, topleft = bottomright), this function gives unexpected behavior: map(0,0,1,1) gives you an empty polygon! To work around this, users of the function need to adjust their rectangles with (0,0,1,1) to get the correct behavior, matching what QRectF does. QRectF(0,0,1,1).bottomRight() == QPointF(1,1) QRect(0,0,1,1).bottomRight() == QPoint(0,0) Reviewed-by: TrustMe
| * | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-171-5/+0
| |\ \ | | | | | | | | | | | | | | | | Conflicts: tests/auto/qpainterpath/tst_qpainterpath.cpp
| * | | Disable mouse tracking in QGraphicsView if possible.Bjoern Erik Nilsen2009-04-071-1/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need mouse tracking unless there are items in the scene that either accept hover events or have a cursor set. This cut-off is extremely efficient in the common case since all items ignore hover events and use the standard cursor by default. We no longer dig for items and do lots of intersection and calculating just for fun :-) We even get rid of the overhead of 2 x QCoreApplication::sendEvent! The next step is to optimize the items(*) functions to simply check for hasCursor()/acceptsHoverEvents() before we do complex checks like intersects/collidesWithPath() etc. Auto test included. Reviewed-by: Andreas
* | | | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-05-181-0/+24
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/kernel/qcoreapplication.cpp Configure.exe not rebuilt because the changes are irrelevant for the S60 port. We'll rebuild it before merging back.
| * | | Reset the 'connectedToScene' flag when changing the scene of a viewLeonardo Sobral Cunha2009-05-131-0/+24
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | In QGraphicsScene::_q_emitUpdated() the slot QGrpahicsView::updateScene(QList<QRectF>) gets connected and a boolean (connectedToScene) is set to prevent double connections. The problem is that this boolean was not reset when the view gets a new scene. Task-number: 253415 Reviewed-by: andreas
* | | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-04-271-5/+61
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
| * | Remove obsolete code from autotests.Jason McDonald2009-04-161-5/+0
| |/ | | | | | | | | | | | | | | Each version of Qt has its own set of autotests, therefore preprocessor directives relating to obsolete QT_VERSION's are not necessary. Reviewed-by: Carlos Duclos
| * Fixup update rect regression by adjusting expose rectangles.Andreas Aardal Hanssen2009-04-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change shows a limitation in Graphics View caused by QPen's default width being 0 (cosmetic), while Graphics View actually does not support cosmetic pens at all. Because items are at risk of drawing lines that poke 1 pixel outside their bounding rect, QGraphicsView must look for items that are up to one pixel larger than their bounding rect mapped to viewport coordinates. Furthermore, mapToScene(QRect) forces us to adjust the input rectangle by (0, 0, 1, 1), because it uses QRect::bottomRight() (etc) when mapping the rectangle to a polygon (which is _wrong_). Since this behavior has been there since 4.2, we don't want to fix it in a 4.5 patch release... The only _proper_ fix to this problem is for the view to know the item's "adjust" in device coordinates, allowing items to use cosmetic pens freely. Fex, we could introduce QGraphicsItem::viewportMargins() or so. Added an autotest to ensure this doesn't break again. Reviewed-by: bnilsen
| * Long live Qt 4.5!Lars Knoll2009-03-234-0/+3954
|
* Long live Qt for S60!axis2009-04-244-0/+3958