This test has recently timed out a few times on OS X test runs, with
no relevant changes to account for the timeout.
Task-number: QTBUG-27890
Change-Id: Ia24f7812ed2a0b3eac51847a7dacbc9f225b48b8
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
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>
By not assuming that we have the '/Developer' directory at the root
of the file system. 'Users' is less likely to be removed/deprecated.
Change-Id: I659bdb67cfb1ed2f73bc643ba4afe1f1f89d5bc5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Tests are passing nowaways on OS X.
Task-number: QTBUG-27890
Change-Id: I6a0a881ece844ef931cb8af51b58d33c40be4d2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Added full path to src dir for testdata.
Task-number: QTBUG-32535
Change-Id: I38e96216e9a016869151adf0ae995e068b8b5354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Added full path to src dir for testdata.
Task-number: QTBUG-32536
Change-Id: I5ef215d451a6407c277d2c98f21ffc35a8657e28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
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>
Instantiate widgets on the stack to ensure they are destroyed
when the QApplication instance goes out of scope.
Introduce waitForWindowExposed() to make sure events are in sync.
Task-number: QTBUG-32125
Change-Id: Ia54e2fa9a7c2e279353c4514a6735e326edf35ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Unactivating a window is not really supported, nor has it ever really
been, so activate another window instead. This incidentally
also makes the test work cross platform.
Change-Id: I6e593e9b7972dd5c5038c8d18a42be90bf19248c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The test currently leaks 2 directories QFileDialogTestDir,
QFileDialogTestDir4SelectFiles in /tmp.
Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4
Reviewed-by: David Faure (KDE) <faure@kde.org>
Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com>
Task-number: QTBUG-31569
Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Because fonts are bigger on BlackBerry than those assumed when the test was
written, explicitly adjust the font size on this platform.
Change-Id: I6a23c28c2d32edf744dd5de09ea0a97fd5f9b6d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Some test cases rely on the fact that show() is not fullscreen, which may not
be true for some platforms. Explicitly make use of showNormal() to avoid
full-screen show on these platforms.
Change-Id: Ie62fe21bf0f466c561a27cffda99d0201b4a45af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Initialize undockedGeometry to roughly the current position.
Task-number: QTBUG-31044
Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
warning C4804: '<=' : unsafe use of type 'bool' in operation
Remove outer loop and replace ugly ROW_NAME macro by
inline function.
Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Update the test code to match the current Qt idiom for finding test data (and
fix it on QNX).
Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Add font combo to top level via layout and position top level
instead of the (child) font combo.
Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
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>
With scrollbars enabled we would get two resize events when tiling the windows.
First one with the expected viewport size, and then a second one with a bigger
viewport when the QMdiArea calculated that the space it set off for scrollbars
was not needed after all. Depending on whether or not the geometry propagation
of the platform plugin was synchronous or not, we would get one or both of the
events before evaluating the viewport size against the expected size, resulting
in flakeyness, and an expected fail on OS X.
We now explicitly disable the scrollbars during the test, and restore them for
the latter test that verifies that scrollbars show up when the area is resized
below the minimum size of the combined child widgets. This allows us to unskip
the expected failure on OS X, and should make the test less flakey.
Change-Id: Ief767456cfd79f5cd0bb0e220c40e5995674ff71
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
XPASS : tst_QWidget::update() QCOMPARE(w.numPaintEvents, 1) returned TRUE unexpectedly.
Loc: [tst_qwidget.cpp(4017)]
Change-Id: Ib7664871ed218f4c88fd2430491fa65443651927
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
There has been frequent failures with CI, especially with OSX 10.7.
These seems to work ok in CI node when ran alone but CI is running
those in parallel with some other tests, and this is causing errors,
most likely due to lost focus.
Change-Id: Ic4151099c27a4b5d91778c9b13e88d2d661e8a0d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The test showed frequent failures with XCB in
initialShow2() (line 3200) after
01bc34088e (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>
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>
This test is unstable on Mac OS 10.7 with developer builds, so marking
it as XFAIL if it happens to fail.
Task-number: QTBUG-30565
Change-Id: If7094c3b19299f0dbe57cb82a8614032a75573d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.
This provoked a couple of existing issues in the qwidget test.
setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.
The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.
resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.
Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.
Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).
Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The signal needs to be emitted directly as the event is not passed to
the QLineEdit if the QSpinBox gets the Key_Return. Since this signal
may be relied upon then we ensure it is emitted directly.
Change-Id: I17cdec62c9f995bacfd7d3cc66d6324f26c84c67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.
Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
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>
Apparently testAllFunctions method has been changed to take pointer,
but code inside different WinCE defines was not updated.
Change-Id: Id15380ecc1e85650d679cb7437923ff9c77057ae
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>
- Remove member variable testWidget and instantiate on the stack
to ensure tests do not interfere.
- Move widgets away from taskbar areas.
- Fix windows geometry warnings by making small windows frameless.
- Fix wrong target widget for key click in
keyBoardNavigationWithMouse().
Task-number: QTBUG-30573
Change-Id: I6d9fad0f212814a67367baf446750e9bed0ebdb2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
- Use qWaitForWindowActive in task178797_activatedOnReturn().
- Remove hardcoded timeouts, use qWaitForWindowActive/Exposed.
- Instantiate widgets on stack or use QScopedPointer to ensure
cleanup.
- Move widgets to a central location, avoiding taskbar areas.
Change-Id: I98991b70067dddab9aa69b1681fa80398ec8b1f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>