summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* 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>
* tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-281-1/+1
| | | | | | | | | | 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
* Fix bug in QGraphicsItem::isVisibleTo().Andreas Aardal Hanssen2011-09-291-0/+108
| | | | | | | | | 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>
* FocusScope's focusItem must always be a descendentAlan Alpert2011-08-301-0/+32
| | | | | Task-number: QTBUG-20699 Reviewed-by: Michael Brasser
* Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-06-081-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (54 commits) Update internal state before emitting configurationChanged() signals. Fixed qmlshadersplugin manual test shaders on SGX family GPU:s. Fixed qmlshadersplugin on windows VC2008 toolchain. Reset input context in Symbian when another window is opened. KERN-EXEC 3 panic in QCoeFepInputContext::translateInputWidget() Close context menus during orientation change. Have -small-screen enabled in certain examples on Symbian always. Update Japanese translations. Revert some of "Make QMLViewer startup animation stop after a while" Fix for winscw QtGui.def Add private method for flushing the pixmap cache. QDeclarative: Fix QPerformanceTimer on Symbian Fix QTreeWidget autotest cases on Symbian/VGA Increase SSL readbuffer 1 -> 16 kB Fix pixel metrics for Symbian VGA devices Revert "Fix QNetworkConfigurationManager usage outside main thread first" Avoid buffer overrun in QMacPixmapData resizing Fix glyph metrics with QStaticText/Freetype/raster and light/no hinting Fix tst_QGraphicsItem::sorting() test case for Symbian Fix QHeaderView test case for VGA Symbian devices. ...
| * Merge remote branch 'origin/4.7' into 4.8-from-4.7Rohan McGovern2011-06-011-0/+9
| |\ | | | | | | | | | | | | | | | Conflicts: src/declarative/declarative.pro tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
| | * Fix tst_QGraphicsItem::sorting() test case for SymbianMiikka Heikkinen2011-05-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have bigger than expected minimum width for scrollbars, which broke the sorting test case as some objects that were expected to be painted were fully obscured by scrollbars and therefore skipped. Task-number: QT-5048 Reviewed-by: Janne Koskinen
| | * 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 remote branch 'qt/4.8' into fire-masterPaul Olav Tvete2011-06-061-18/+18
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wayland/qwaylandclipboard.cpp src/plugins/platforms/wayland/qwaylandclipboard.h src/plugins/platforms/wayland/qwaylanddisplay.cpp src/s60installs/eabi/QtOpenGLu.def
| * | Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| | * \ Merge remote branch 'origin/4.8' into qa-review-masterRohan McGovern2011-05-151-1/+78
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| | * | Reduce usage of Q_ASSERT in autotests.Jason McDonald2011-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using Q_ASSERT does nothing in release-mode builds, and in debug builds it causes tests to terminate prematurely. It is much better to use QVERIFY or QCOMPARE. Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
| * | | 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
* | | Fix autotest to not depend on rasterization detailsaavit2011-05-311-0/+2
|/ / | | | | | | This test broke with 37c329a.
* | QGraphicsItem::ItemStops[ClickFocusProgration|FocusHandling] must not ↵Michael Hasselmann2011-04-011-1/+78
|/ | | | | | | | | | | 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>
* Introduce QGraphicsItem::ItemStopsFocusHandling flagMichael Hasselmann2011-03-161-11/+58
| | | | | | | | | | | | | | | | | | | | 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
* 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-0/+53
| | | | | | | | Crash introduced by 783a278f243c6411f5f32d11f2165b9eed9b6f8c. Autotest written by Niklas Kurkisuo <ext-niklas.kurkisuo@nokia.com> Task-number: QTBUG-16374 Reviewed-by: TrustMe
* Fix QGraphicsItems autotestRalf Engels2010-11-021-0/+2
|
* Fixed QGraphicsItem autotest to use a dummy toplevel widgetDominik Holland2010-11-021-19/+48
|
* Further focus scope fixes.Michael Brasser2010-10-191-0/+1
| | | | | | Follow-up to e11ee40cefc981fbdcfb10816039d4efb080fb17. Reviewed-by: Yoann Lopes
* Fixed QGraphicsItem to send ItemScenePositionHasChanged when appropriateJ-P Nurmi2010-10-181-0/+27
| | | | | | | 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-0/+3
| | | | | | | 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
* QGraphicsItem device coordinate cache unefficient in portrait modeBjørn Erik Nilsen2010-10-061-0/+76
| | | | | | | | | | | | | 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
* Setting QGraphicsItem::ItemClipsChildrenToShape forces ItemClipsToShapeBjørn Erik Nilsen2010-09-221-0/+188
| | | | | | | | | | | | 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
* Build fix on Solaris for an autotestThierry Bastian2010-09-011-1/+1
| | | | | Task-number: QTBUG-12993 Reviewed-by: Trust-Me
* Fixes QGraphicsItem::focusItem() returning incorrect value.Yoann Lopes2010-07-131-0/+27
| | | | | | | | | | | | 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/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation.Bjørn Erik Nilsen2010-06-241-0/+54
| | | | | | | | | | | | | 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
* tst_qgraphicsitem: stabilize on X11Olivier Goffart2010-06-031-0/+1
|
* Wrong QGraphicsItem::childrenBoundingRect() when applying effects.Bjørn Erik Nilsen2010-05-271-0/+29
| | | | | | | | | 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
* Fixes QGraphicsItem::scroll issuesBjørn Erik Nilsen2010-05-211-1/+84
| | | | | | | | | | | | | | | | | | | | The biggest and most important issue was that QGraphicsItem::scroll always accelerated the scroll without taking overlapping items or opacity into account, which caused drawing artifacts. We can only do accelerated scrolling if the item is opaque and not overlapped by other items. There's no (sane) way to detect whether an item is opaque or not (similar to Qt::WA_OpaquePaintEvent), which means we cannot support accelerated scrolling unless the item is cached into a pixmap (QGraphicsItem::setCacheMode). The second issue was that QStyleOptionGraphicsItem::exposedRect always contained the whole boundinRect() after an accelerated scroll (even with the QGraphicsItem::ItemUsesExtendedStyleOption flag enabled). Auto test included. Task-number: QTBUG-8378, QTBUG-7703 Reviewed-by: yoann
* Reset the dragDropItem to 0 when the item dies while dragging on top it.Alexis Menard2010-05-121-0/+24
| | | | | | | | If you drag something on top of an item and the former is deleted then we need to reset the dragDropItem pointer to 0. Task-number:KDE BUG 232182 Reviewed-by:leo
* QGraphicsView drawing artifacts due to rounding errors.Bjørn Erik Nilsen2010-05-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix update issue when an item has an effect and child.Alexis Menard2010-04-271-0/+47
| | | | | | | | | | | | | | When a child marks its parent as dirty (and the parent has an effect) and they are not in a scene, they must not set fullUpdatePending to 1 because if the scene is in fullUpdate (not yet painted) then the item will not be processed by processDirtyItemRecursive so the fullUpdatePending flag will never be reset by resetDirtyItem. Any calls to update() will be then discarded because it will think that a full update is pending for the item. A full update will be done anyway by the scene and if not then markDirty will do its job when the parent will be added to the scene. Task-number:QTBUG-10037 Reviewed-by:bnilsen
* Fix QDeclarativeTextInput and QGraphicsView in regards of input methods hints.Alexis Menard2010-04-271-2/+50
| | | | | | | | | | | | | | | | | | When the echoMode changes for QDeclarativeTextInput we need to update the inputmethod hints. Also in QGraphicsView we need to update the input context installed on the view to make the former is aware of the change. For the input context framework the only way to deal with the current widget is focusWidget(). Unfortunately the widget that has the focus is the QGraphicsView so the input context don't know the real object QGraphicsView is actually focusing. We must keep in sync the inputMethodHints of QGV with the object QGraphicsView is focusing so the input context just called focusWidget()->inputMethodhints() to update itself. Task-number:QTBUG-9922 Reviewed-by:janarve Reviewed-by:bnilsen Reviewed-by:Michael Brasser
* Fixes keyboard shortcuts for QGraphicsTextItem.Yoann Lopes2010-04-201-0/+38
| | | | | | | | The event ShortcutOverride was not handled by QGraphicsTextItem. Autotest included. Task-number: QTBUG-7333 Reviewed-by: bnilsen
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-091-13/+10
|\ | | | | | | | | Conflicts: src/multimedia/audio/qaudioinput_win32_p.h
| * Did not include updated repaint number for parent item in revert.Toby Tomkins2010-04-061-1/+1
| |
| * Partially revert "Remove qWait functions as it is used in QTRY_* macros."Toby Tomkins2010-04-011-172/+314
| | | | | | | | | | | | | | | | | | | | Needs investigation of autotest failures on QWS, osx, win platforms. This reverts commit 741b75b8e595a26944ba8fca8835463787b02676. Conflicts: tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * Merge commit 'origin/4.6' into 4.6-multimediaToby Tomkins2010-04-011-6/+83
| |\ | | | | | | | | | | | | Conflicts: tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-multimedia-staging ↵Toby Tomkins2010-04-011-0/+34
| |\ \ | | | | | | | | | | | | into 4.6-multimedia
| * | | Remove qWait functions as it is used in QTRY_* macros.Toby Tomkins2010-04-011-327/+182
| | | | | | | | | | | | | | | | Reviewed-by: rohan mcgovern
* | | | Skip tst_QGraphicsItem::updateMicroFocus test on Windows and Mac as it does ↵Olivier Goffart2010-04-011-0/+4
| | | | | | | | | | | | | | | | not passes
* | | | Attempt to fix the test.Alexis Menard2010-03-311-2/+2
| | | | | | | | | | | | | | | | Reviewed-by:TrustMe
* | | | Add a QGraphicsItem::updateMicroFocus() to QGraphicsItem.Alexis Menard2010-03-311-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItem is no more lacking a way to notify the input method of a changed micro focus. Reviewed-by:denis Reviewed-by:simon hausmann
* | | | Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-03-302-2/+94
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/modules.qdoc mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h 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 System2010-03-301-1/+80
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (47 commits) QScript: More missing APIShim QScriptEngine: Fix reentrency involving creation and desctructions of QScriptEngines Work-around Symbian 10.1's broken egl.h Add some #warnings to debug Symbian EGL build failure Don't detect EGLImage presence by testing function pointers Implement proper QStaticText support in QPaintBuffer Make QStaticText layout lazy Change QStaticText::setMaximumSize() to setTextWidth() Respect QPainter::pen() in QPainter::drawStaticText() QVarLenghtArray: add some API to be consistant to QVector Don't try to resolve EGLImage function pointers if they are defined Change ORs to ANDs when checking EGLImage extension defines Protect EGLImage function definitions in #ifdef Fix a bug in greek shaping causing infinite loops Define QT_NO_EGL in configure.exe improve mingw 64 bit support Fix build on Windows Round instead of ceil font metrics when ForceIntegerMetrics is enabled cetest: remove source file duplicates from cetest.pro Remove EGLImage create/destroy resolving from VG pixmap data ...