1. Use qrc for test data so that it can be found on all platforms.
2. Skip a test which does not work on platforms where show() implies
showMaximized(), as it depends on the window size being 150x150.
3. Skip test for hover event which depends on having a valid
mouse cursor position.
4. Skip a couple of tests that fail on some Android devices.
It's not worth spending a lot of time investigating this at the
moment.
Change-Id: Icb2b7f1d82981546a2154a76535b95606d7f40da
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This reverts commit 56aad2ad60.
QWidget::mapFromGlobal() does not work correctly when the widget is
a child widget of another widget embedded into a QGraphicsView with a
transformation (scaling/rotation). It starts applying offsets going
up the widget tree (just as mapToGlobal) until it hits the embedded widget
not taking into account the transformation.
It would need to go in from to top to bottom or better be reimplemented
such that a QTransform for mapping coordinates from/to global is determined
which is then applied in reverse.
Task-number: QTBUG-50030
Task-number: QTBUG-50136
Change-Id: Iadeb891d793be1938c64942bfbf38d541a281c33
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The test produces compiler warnings in release builds:
tst_qgraphicswidget.cpp: In member function 'void tst_QGraphicsWidget::setTabOrderAndReparent()':
tst_qgraphicswidget.cpp:1521:89: warning: 'w2' may be used uninitialized in this function [-Wmaybe-uninitialized]
tst_qgraphicswidget.cpp:1536:88: warning: 'w1' may be used uninitialized in this function [-Wmaybe-uninitialized]
Use arrays instead of the variables w1,2... and rewrite the helper
function compareFocusChain() to work on iterators allowing to
remove some temporary lists. Also return error messages in a
QByteArray ready for the Q[TRY_]VERIFY2 macros.
Change-Id: I43466921af59521d1faf00b75fe943508418abb3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.
Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The platform is no longer supported or actively maintained, and is
in the way for improvements to the Unix event dispatcher and QProcess
implementations.
Change-Id: I3935488ca12e2139ea5f46068d7665a453e20526
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Use QByteArray/QString addition instead in loops and for
test row names.
Change-Id: Ia067cd966bf13506e6ca19925eae3158da027b83
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Use case insensitive comparison and static invocation
of QGuiApplication::platformName().
Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
When working with QGraphicsView/QGraphicsScene, touch events are sent to
QGraphicsView's viewport() event handler, which then dispatches it to the
corresponding QGraphicsItem, if any. In the case of QGraphicsProxyWidget, we
need to forward these touch events to the encapsulated QWidget, otherwise it
will never receive them (i.e. the event chain for touch events terminates at
QGraphicsProxyWidget).
This also enables QWidgets associated with QGraphicsProxyWidget to grab
gestures.
Task-id: QTBUG-45737
Change-Id: Ia441d3576afb6c97376be6f2ff073901e6e928a5
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
It sends a shortcut override event directly, which should go
though QPA anyways.
Change-Id: Ie2c6f45cd44222cd9be8846099573dcd2968a77c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The keyword no longer has a meaning for the new CI.
Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This will allow us to drop gtk2 support from qtbase in future,
while still providing the gtk2 style for those who want to use it.
Also with moving to qtstyleplugins, the code can be simplified
because we can directly link to libraries we need, instead of using
QLibrary.
[ChangeLog][QtWidgets] Remove QGtkStyle, it is now provided in
qtstyleplugins repository.
Change-Id: I6221b1a513d7fda32e080f3ca159b0b2f8a8f246
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Fix usage of API that is marked deprecated.
Change-Id: Ib9a45e93084fb5b0d0d3aefd64b755dff7c696d6
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: Ie29640451dddeb58342038a8cd5fac152cce39e5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Rename the test slot eventFilter() to testEventFilter(), which fixes:
tst_qgraphicsproxywidget.cpp:101:10: warning: 'tst_QGraphicsProxyWidget::eventFilter' hides overloaded virtual function [-Woverloaded-virtual]
void eventFilter();.
Change-Id: Ia05d188b18dcbf3a0b093dcea19a7122bcde6e62
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
tst_qgraphicsanchorlayout.cpp:144:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
layoutGeometry.adjusted(+right, +top, -left, -bottom);
Change-Id: I411ccaa867e418f36869fc244ea2eeaa5b117312
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.
Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Move the code path handling widgets embedded in QGraphicsProxyWidget
into the loop moving up the parent hierarchy.
Add child widget to test.
Task-number: QTBUG-41135
Change-Id: Ibd86413faaa927145a85a2f5864f162979135053
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
They didn't show up in the "old" CI runs because they usually pass the second
time they are executed - which the testrunner does. The new CI doesn't do that
anymore, instead we now mark those tests explicitly and will track their record
of passing and failing in the new metrics database.
Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
make sure it'll work with the new mouse handling as well.
Change-Id: Ia2d567e618b77b0fa3532ee6c335cbdf5e496241
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The failing test has been blacklisted in 3ed6f74fb2.
Change-Id: I5a2defd839e2f98690fc8cea9ff18e7503caf0de
Task-number: QTBUG-25294
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QGraphicsWidgetPrivate::init had a special code path for setting
the item's parent. For some reason that code path caused the
ItemChildAddedChange notification not to be sent to the parent
element, which is wrong. Instead use the "normal" path, which is
what the QGraphicsItem constructor does anyhow.
Change-Id: Iad84cae05d797022a45977d35ca00c80c17c306a
Task-number: QTBUG-45867
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
The test tst_QGraphicsIten::sorting is blacklisted but always passing.
Change-Id: I69bbd4b4bbe227267e16ab5558ddabe7d2c0b1b3
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
On OS X 10.10. This test is currently failing in CI.
Change-Id: I1b3a33b404c915e83c5e4fa0a7af69d1b941d93c
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Instead of making insignificant the all platform for
QtBase 5.5 integration.
Change-Id: Ief3f29c094bdbc90e684f19c1077ee595fb7d581
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
Disable top-level widget code path for embedded widget in the show
helper.
Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to
mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming
the ifdefs we make it clear that the code in question is dead.
In incremental follow-ups, we can then selectively either remove, or
port, the pieces that are dead code.
Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.
Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
If the user has some objects selected and holds down the "extend selection"
key (Control on Windows, Command on Mac OS X), clicking and dragging a
rubber band selection deselects the current selection. This is
counter-intuitive and confusing for users.
This commit fixes the behavior so users can extend selections using the
rubber band when the proper key is held down.
Task-number: QTBUG-6523
Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
The problem was that the span we stored in the multiCellMap was the
"effective" span (i.e. the given span subtracted with the number of
ignored rows it would span). Later we used that span to distribute its
size across all its cells. However, since the span now could be smaller
that the given span, we could sometimes fail to distribute to the last
span(s).
[ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't
distribute themselves to the last cells they covered.
Change-Id: I31db3d850484dc8b70d62c5f02f680740578c661
Task-number: QTBUG-43099
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Instead of sending the event from random places, send it from
QWindowSystemInterface. This allows to send override events on OS X to
menus before doing other key processing and reduces the number of
ShortcutOverride events on all platforms to exactly one per key press
event.
Additional test by Friedemann Kleint.
Task-number: QTBUG-38986
Change-Id: I6981bb776aba586ebc7c3daa5fd7a0d84c25bc3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Removing and adding toplevel items could result in invalid stacking
order (not corresponding to insertion order).
Task-number: QTBUG-19316
Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Selection rectangle was incorrectly mapped to scene space when the
view was rotated. It became a rotated rectangle instead of the correct
polygon (rhombus).
Task-number: QTBUG-42008
Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Since layout items can now be hidden, this also makes sure we respect
the QSizePolicy::retainSizeWhenHidden
Task-number: QTBUG-20132
Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>