summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Stabilize and speed up tst_QGraphicsItem::cursor().Friedemann Kleint2014-05-221-12/+22
| | | | | | | | Use QTRY_COMPARE instead of hard-coded timeouts, ensure window is shown. Change-Id: I4f23144ee14150c4fba9c6fbd8c4ee2da472cc75 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix crash when deleting top level windows embedded into QGraphicsProxyWidget.Friedemann Kleint2014-04-141-7/+0
| | | | | | | | | | Clear proxyWidget pointer in slot QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot(). Task-number: QTBUG-29684 Task-number: QTBUG-33213 Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QNX: Fix QGraphicsView autotestsBernd Weimer2014-04-081-9/+26
| | | | | | | | | On BlackBerry first window is always shown full screen. However, many tests rely on a specific window size. A dummy full screen window is created so subsequent windows have correct size. Change-Id: Id8bd0212b6eca677953e78505459e3cd69bc6328 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* tst_qgraphicsproxywidget: Fix hang in actionsContextMenu().Friedemann Kleint2014-03-281-10/+31
| | | | | | | | | | Change the test widget to use a non-single-shot timer to hide the menu once it has become visible. The test shows hangs on Windows 8.1 CI nodes. Task-number: QTBUG-37822 Change-Id: I8fc782e53256616119920aef714f89f25863b39f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QNX: Fix QGraphicsItem autotestFabian Bumberger2014-03-211-1/+1
| | | | | | Change-Id: I85b0938e6ebeb9f24e24b51a594c01b74167a177 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
* Fix spurious XPASS in tst_QGraphicsAnchorLayout.Friedemann Kleint2014-03-141-12/+19
| | | | | | | | | | | | | | | Seen on Windows: XPASS : tst_QGraphicsAnchorLayout::stability() QCOMPARE(sameAsPreviousArrangement, true) returned TRUE unexpectedly. tst_qgraphicsanchorlayout.cpp(1399) : failure location Move check into loop with descriptive message on fail, do not error out if it actually passes. This now typically prints: XFAIL : tst_QGraphicsAnchorLayout::stability() The layout has several solutions, but which solution it picks is not stable ( QRectF(30,0 0x10) != QRectF(30,0 10x10) , iteration 3 , item 4 ) Change-Id: Iae8553dbbcedeb70d5d672e3cefbd1f06a63d27d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-133-21/+21
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * Stabilize tst_QGraphicsItemMarc Mutz2013-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | The cursor() test was missing a QTest::moveMouse() before sending of the mouse event (as all the following subtests do). When run on a desktop with the panel on the left side of the screen, the mouse pointer would land over the left item instead of in between them, as assumed by the subtest, and the following QCOMPARE failed. Change-Id: Ib74fdf0cfbfbc8ecb79a906610a2da5cb50c89d0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add proper abstractions to the grid layout engine.Jan Arve Saether2013-12-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The abstractions are needed so that they can work with both QGraphicsLayouts and QtQuick.Layouts. Since the plan is to move the engine to QtGui, this means that the engine cannot have any references to anything in the QtWidgets module. As a consequence of that several things had to be done: * The style info object had to be redone with an abstraction layer to get rid of style and widget dependency. (Abstract class is called QAbstractLayoutStyleInfo) * QGridLayoutEngine must be subclassed due to some specializations for QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngine. * QGridLayoutItem must be subclassed due to some specializations for QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngineItem. Did also some minor cleanups, reordered arguments so that all styleInfo arguments are last in all function calls This also fixes QTBUG-35099 (bug was spotted during this refactoring) Task-number: QTBUG-35099 Change-Id: If49d40f71870dc8d99d2e145be158e3080b595fa Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Add test for default (style dependent) spacingsJan Arve Saether2013-11-281-0/+94
| | | | | | | | | | | | Task-number: QTBUG-35099 Change-Id: If19d3ccf7177dcbecef30b3ba1e16b022a3d54c4 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-264-9/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Stabilize tst_QGraphicsWidget::updateFocusChainWhenChildDie().Friedemann Kleint2013-11-201-2/+10
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I185bcd91bcdffbc0460a4d24f685d3dde84338a7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Stabilize tst_QGraphicsView::hoverLeave().Friedemann Kleint2013-11-201-6/+8
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I0fab91c65b30e7028343c7e9b19a1b232fe72ebf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Stabilize tst_QGraphicsScene::isActive().Friedemann Kleint2013-11-201-1/+4
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I84349dd696a633840973e9db0c538830aaa96948 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Skip tst_QGraphicsItem::ensureUpdateOnTextItem() on OSX 10.7Gunnar Sletta2013-11-141-0/+6
| | | | | | | | | | Change-Id: Iedb8ed3ac797d11c47f08b92507401e2e1e96c14 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-241-0/+4
|\| | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * Skip tst_QGraphicsItem::paint() on Mac OS X 10.7Simo Fält2013-10-151-0/+4
| | | | | | | | | | | | | | | | | | The test is randomly failing on CI when ran on 10.7. Task-number: QTBUG-31454 Change-Id: I79fce9a37616c6abaee960e338f8eea8fe6f31cf Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | WinRT: Fix various test compilationsAndrew Knight2013-10-024-4/+4
|/ | | | | | | | | | | | | - Remove irrelevant test subdirs via .pro files - Follow WinCE codepaths where applicable - Replace unsupported Win32 APIs with WinRT equivalents This does not aim to fix any failures in the tests themselves; it only makes them compile. Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-5/+109
|\ | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Forward QGraphicsView::mouseDoubleClickEventMarcel Krems2013-09-061-5/+109
| | | | | | | | | | | | | | | | | | | | Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Skip tst_QGraphicsProxyWidget::popup_subwidget on Windows.Friedemann Kleint2013-09-031-0/+3
| | | | | | | | | | | | Task-number: QTBUG-33213 Change-Id: I1c8daa3a859f9d0d760054f1d8934abd84f62f0d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-221-4/+7
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-4/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| | * Fix QGraphics(Ellipse)Item autotestGiuseppe D'Angelo2013-08-191-4/+7
| | | | | | | | | | | | | | | Change-Id: I6d5d702e97a0186979bd3bdcd0526d53afeecbd8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | tst_qgraphicsproxywidget: fix memory leakDavid Faure2013-08-211-0/+5
|/ / | | | | | | | | Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on WinFrederik Gladhorn2013-08-201-0/+4
| | | | | | | | | | | | | | | | | | This tests crashes a lot lately. Task-number: QTBUG-29684 Change-Id: I6892238dc071f050b0208dd5b4843629fa707347 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.David Faure2013-08-201-0/+3
| | | | | | | | | | | | | | Created QTBUG-33067 for tracking the issue, after some debugging. Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-0/+61
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Fix double transform for items ignoring parent transformations.Andreas Aardal Hanssen2013-08-051-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the topmost untransformable's scene transform, which includes the item's position and local transformation, was used to determine the item's anchoring position. This position was then passed on to be multiplied by the item's transform again. This works fine for toplevel untransformable items that don't have any transform set at all, but those who do would have their transforms applied twice - one to determine the anchoring position, and again to transform the item itself. Since only translation transformations can affect the first operation (the anchoring pos), this bug only applies to items that set ItemIgnoresTransformations and use a local transform that includes translation. Task-number: QTBUG-21618 Change-Id: I772d52d59dfd9f242d0140632a87e9c68dfe0ea1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Re-enable tests tst_qgraphicsproxywidget, tst_qgraphicswidget.Friedemann Kleint2013-07-241-2/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-25294 Task-number: QTBUG-20778 Change-Id: I6b6e19e812d5527465c6162e2df2e4807cf160da Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-0/+52
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * Make *ItemBoundingRect modes work with custom shapes.Mitch Curtis2013-07-161-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, calling QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect) will exclude items whose shape does not contain QPointF(0, 0). This is because QGraphicsSceneIndexPointIntersector::intersect() also checks if the point is contained within the shape, instead of just checking if it is contained within the bounding rect. Task-number: QTBUG-19036 Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-041-0/+12
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/plugins/platforms/cocoa/qnsview.mm Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
| * Made sure items with preferred width of 0 could also stretchJan Arve Saether2013-05-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no stretch factors were specified, we used the preferred size as a stretch factor. Obviously, that didn't work if the preferred size was actually 0. This patch works around this by actually setting the stretch factor to 1.0 if this is the case. This should work fine in most cases, except for the case where there are also other items with a preferred size close to 0. In this case, the item with preferred size 0 will just grow faster than an item with e.g. preferred size 0.1. Task-number: QTBUG-31217 Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | widget/graphicsview: Do not run tests showing windows in parallel.Friedemann Kleint2013-06-035-6/+0
| | | | | | | | | | Change-Id: I3bba3f49eba6ca9c187caf696d0f6c73372fec5d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Remove XFAIL from tst_qgraphicswidget::initialShow2().Friedemann Kleint2013-05-272-4/+0
| | | | | | | | | | | | | | | | The test now passes on Ubuntu, Lucid, too. Task-number: QTBUG-20778 Change-Id: Id7ddc4b34d03f8fb9af977c0f40615d544934f13 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-234-17/+61
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Stabilize tst_qgraphicssceneindex.Friedemann Kleint2013-05-231-1/+1
| | | | | | | | | | Change-Id: I8cda10a5a4c9bf949b560e7be4da9bef92667688 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * QGV: fix items not to be selected on right mouse button releaseJ-P Nurmi2013-05-141-0/+28
| | | | | | | | | | | | | | Task-number: QTBUG-30990 Change-Id: I421d9169b592da2b468eceb9df4f3f7c6a06e8d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Stabilize QGraphicsWidget test.Friedemann Kleint2013-05-091-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test showed frequent failures with XCB in initialShow2() (line 3200) after 01bc34088eb8e7fb4842fa1c2117cddbac086136 (QTBUG-30923) which can be fixed by ensuring the widget from the HFW-test is deleted. Use QScopedPointer to ensure widgets are always deleted in case of test failures, too. Task-number: QTBUG-20778 Task-number: QTBUG-30923 Change-Id: I2af7737b604820463f760d6b6787dd5a5a93d602 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Fix tabFocusFirst when that item is removed from QGraphicsSceneMiikka Heikkinen2013-05-081-0/+18
| | | | | | | | | | | | | | | | | | | | If tabFocusFirst is not cleared or set to another valid item, there will be crash later if the removed item is deleted after removal. Task-number: QTBUG-30923 Change-Id: Iba9a6ce9334c52f8e552b0accda95ebb5fcfcdb1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Add QSKIP to hoverenter-test in tst_qgraphicsproxywidget.Friedemann Kleint2013-05-071-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-25294 Change-Id: I7a674dc49d84c7c68a877bcf64c14e9726dd481e Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Fix XPASS in tst_qgraphicswidget (Windows).Friedemann Kleint2013-05-071-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-20778 Change-Id: I90c8135fab85872cae22630c53fef7aed835a19c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-221-1/+1
|\| | | | | | | Change-Id: I059725e3b7d7ffd5a16a0931e6c17200917172b5
| * Fix qgraphicsview autotest build for WEC7.Janne Anttila2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | logicalDotsPerInchX returns qreal, and qreal in WEC7 is defined to float instead double. There is no required overload: qFuzzyCompare(float,double) And for that reason build fails. Ensure qreal is casted to double which is default type used by compilers for floating point literals such as '96.0'. Change-Id: I24c701715b3dcf1a2137256a1c251c19d0c1dbe9 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* | Fixed a bug where the MaximumSizeHint of a layout with spans was wrongJan Arve Saether2013-04-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This was spotted while tracking down a similar bug related to spans. This now also eliminates the Q_EXPECT_FAILs in heightForWidthWithSpanning(), since it now finally works. The problem was only for the maximum size, since the size of an ignored row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed values for a QGridLayoutBox). Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Fixed a bug where spans across empty cells got broken.Jan Arve Saether2013-04-031-0/+28
|/ | | | | | | | | | | | | | | If a row/column is only used only because of the spanning of an item, the cell should be treated as it didn't exist. We keep track of this with the "ignore" bit array. The old code would always start from the row/column at position 1. In the attached testcase this made the effectiveRowSpan become larger than actually needed. Task-number: QTBUG-30255 Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-2812-12/+0
| | | | | Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}Debao Zhang2013-03-272-2/+2
| | | | | Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>