Commit Graph

1717 Commits

Author SHA1 Message Date
Liang Qi
aadfe7d634 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/gui/kernel/qguiapplication.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/testlib/qtestsystem.h

Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
2017-09-26 16:14:54 +02:00
Richard Moe Gustavsen
0dbede2b17 Widgets: be able to tab to a widget that has a focus proxy
When tabbing/searching for the next focus widget, the current
code would check if the next widget in the focus chain
had a focus proxy, and if so, ignore it. The exact reason
for this behavior is not clearly understood, but some widgets
(e.g QSpinBox) has children (a QLineEdit) that sets the parent
as focus proxy. If we didn't ignore children with focus proxy, tabbing
from a QSpinBox would lead us to find the inner QLineEdit, which
(because of its proxy), would lead us back to the QSpinBox. And
therefore not be able to tab out.

But ignoring the focus proxy has other problems. Normally a focus
proxy is the next sibling to the widget it acts as a proxy for, and
tabbing to the widget will therefore appear correct. But if the
focus proxy is not the next sibling, the logic will fail, since
the tab would anyway give focus to the next sibling. This becomes very
apparent if the focus proxy is a child of the widget, since then
its likely that the focus proxy is not the _first_ child among all
the children. So tabbing to the parent would not give focus to
the proxy.

This patch will change this logic so that you are allowed to tab to a
widget with a focus proxy. But we check that if you do so, you actually
end up moving focus in the right direction. If not, we ignore it like
before. This will ensure that we tab correctly when dealing with focus
proxies, and especially when focus proxies are used to construct
compound widgets.

[ChangeLog][Widgets] When tabbing to a widget with focus proxy, focus
will now be given to the proxy rather than just being ignored.

Task-number: QTBUG-10907
Change-Id: I66d1da5c941fdd984bb2783cc355ca65b553b5dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-09-25 07:18:37 +00:00
Shawn Rutledge
bcdd07ceb8 Blacklist tst_QItemDelegate::enterKey tests on openSUSE 42.3
Task-number: QTBUG-62967
Change-Id: Ifce1c8732e126e26636057de29e1fe6348c914bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-09-22 14:34:30 +00:00
Liang Qi
e5114e10dc Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2017-09-21 06:55:09 +00:00
Liang Qi
01bc69f99f Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/util/qcompleter.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmdisubwindow.cpp

Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
2017-09-20 11:58:32 +02:00
Tony Sarajärvi
bf41fbb233 Blacklist tst_QGraphicsScene::isActive in openSUSE 42.3
This autotest is blacklisted as it is deemed flaky.

Task-number: QTBUG-63260
Change-Id: I3e83bcb0dbbe4fbf9d5c16f764fbeeca2b52d10c
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-20 09:48:36 +00:00
Kevin Funk
58c14c4a7e Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
  (definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:55 +00:00
Kevin Funk
47c92fbb0b Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
  (definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:42 +00:00
Stephan Binner
bef8b905af Convert features.sizegrip to QT_[REQUIRE_]CONFIG
Change-Id: Ieac4ae1f0b8b84e943c00da9903346a44e57138c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-12 18:12:47 +00:00
Andy Shaw
764854dc47 Call canFetchMore/fetchMore when scrolled to the bottom of the view
When scrolling to the bottom of the view, if there are expanded items
then it should call canFetchMore/fetchMore up the chain until it
finds one with more items that can possibly be retrieved.

This brings it in line with the QAbstractItemView implementation
which would call canFetchMore on the root index, therefore we
go up the chain to the root to see if anything before that can be fetched.

[ChangeLog][QtWidgets][QTreeView] QTreeView now calls canFetchMore and
fetchMore when the bottom of the QTreeView is scrolled to.

Task-number: QTBUG-48725
Change-Id: I2b2145684bb34c8c317bfce4a0ef14f243a64719
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2017-09-12 12:56:18 +00:00
Gatis Paeglis
1af927976a tests: fix and un-blacklist tst_qgraphicsview::hoverLeave
Tests should not use QCursor to emulate mouse move, see QCursor::setPos() docs.

The flakiness of the test on XCB is not surprising when the test queries geometry
even before the window has been shown. With the re-factored version I could not
reproduce flakiness anymore.

Removed Q_OS_MAC and closed QTBUG-26274 as test passes on macOS from which I
assume that the underlying issue has been fixed.

Removed Q_OS_QNX ifdef as test does not rely on QCursor anymore.

This patch also fixes the issues on minimal / offscreen platform plugins.
QCursor::setPos() is evil for auto test purposes.

Note:

We intentionally use QTest::mouseMove(QWindow *window, ..), not the QWidget overload.
The QWindow version gets routed through QWSI, which ensures that all necessary events
are generated as expect. In QWidget code path this is currently disabled by
QTEST_QPA_MOUSE_HANDLING.

Change-Id: I285c26cff09e3f2750f8c2abbb1f46c8f7be984a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-07 15:16:46 +00:00
Liang Qi
19dd2ca93b Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	examples/opengl/qopenglwidget/main.cpp
	src/3rdparty/pcre2/src/pcre2_printint.c
	src/plugins/platforms/cocoa/qnsview.mm
	src/widgets/widgets/qcombobox.cpp

Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
2017-09-06 13:26:31 +02:00
Friedemann Kleint
3b6fb8f22e Use QTRY_COMPARE in tst_qwidget::activation() (Windows only)
Speeds up the test from approximately 770ms to 180ms.

Change-Id: I2e5479fd5190b841b44d4a66380d27b1c3b55162
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-06 10:28:02 +00:00
Tony Sarajärvi
f9fea20c10 Extend blacklisting of tst_QWidget::maskedUpdate to openSUSE 42.3
Task-number: QTBUG-51399
Change-Id: I7fcc52da2ce539251f6bad0394c4580dd76439a7
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-04 12:11:47 +00:00
Tony Sarajärvi
a2dbf1e779 Blacklist tst_QItemDelegate::enterKey tests on openSUSE 42.3
Task-number: QTBUG-62967
Change-Id: I42f25120f1a9e2ef6a9a147e4f36edcdff2922a6
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-04 12:11:44 +00:00
Stephan Binner
093064fdeb Convert features.completer to QT_[REQUIRE_]CONFIG
Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 11:28:02 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	qmake/library/qmakebuiltins.cpp
	src/corelib/global/qglobal.cpp
		Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
	src/corelib/global/qnamespace.qdoc
	src/corelib/global/qrandom.cpp
	src/gui/kernel/qwindow.cpp
		Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
	src/network/ssl/qsslkey_openssl.cpp
	src/plugins/platforms/android/androidjniinput.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/widgets/widgets/qmenu.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp

Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
2017-08-31 14:31:31 +02:00
Joni Jäntti
e938150412 Revert "tst_qwidget::activation expect fail on Win 10"
This reverts commit 8561281768.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: Ice250ecedb14ac96fb3693b2d9884ef452a91cc2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-30 12:49:02 +00:00
Joni Jäntti
de6d6eb13e Revert "tst_qgraphicswidget expect fail on Win 10"
This reverts commit 3d5bf00f18.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: I9f1c88606c97afc5952af34e04310612b783a9c2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-29 11:59:23 +00:00
Gabriel de Dietrich
b65e30c861 QWidget: Call appropriate QWindow method from setGeometry_sys()
When calling resize() from showEvent(), we'd set the full geometry
on the widget's QWindow. This resulted in the top-level window
being moved to the top-left corner, even though no other call to
move() or setGeometry() had happened before.

The solution consists on calling the proper QWindow methods depending
on whether setGeometry_sys() is called for a move, a resize or both.

Furthermore, this needs QWindow::resize() to set its position policy
to frame-exclusive. The documentation states that is already the case
and we're setting the full geometry on the platform window, so we need
to convey that bit of information.

This also solves the age-old conundrum: "### why do we have isMove as
a parameter?"

Change-Id: I2e00fd632929ade14b35ae5e6495ed1ab176d32f
Task-number: QTBUG-56277
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-23 08:42:44 +00:00
Morten Johan Sørvig
750a252b89 Blacklist tst_QMessageBox::defaultButton on osx ci
Has become flaky on CI. Does not fail locally.

Change-Id: I42938849571938db78b16a72c215442a69f7c2d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:54 +00:00
Liang Qi
106d3b9bf9 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenu.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/widgets/styles/qstylehelper_p.h

Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
2017-08-15 16:31:48 +02:00
Jarkko Koivikko
8de79dbcec Widgets: Fix ImSurroundingText query for a QLineEdit with mask
QLineEdit with a mask does not return empty fields with the
ImSurroundingText query. This is a problem for the input
context that is not aware of the mask and relies on the
fact that the cursor position never exceeds the boundaries
of the surrounding text.

This change fixes the issue by returning unmasked text with
the ImSurroundingText query.

[ChangeLog][QtWidgets][QLineEdit] Fixed behavior of the
ImSurroundingText query. Previously, it returned a masked
text whose length may be less than the cursor position.
Now it returns unmasked text, so the text length is always
greater than or equal to the cursor position.

Task-number: QTBUG-60319
Change-Id: I1c8009164836a1baa2e3a45958bf1ea5fa9be38d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-08-11 13:27:37 +00:00
Thiago Macieira
883dfb3d15 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/kernel/qwidget.cpp

This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).

Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
2017-08-08 11:48:10 +02:00
Raschbauer, Reinhard
52c66e8515 QAbstractItemView: fix nullptr violation
If in a slot connected to QAbstractItemView::clicked
QAbstractItemView::setModel(nullptr) is called the method
QAbstractItemView::mouseReleaseEvent will cause a segmentation fault.
The problem is that the method QAbstractItemView::model used in
QAbstractItemView::mouseReleaseEvent will return a nullptr if a null
model was set. The solution is to used d->model since it is always a
valid model. (See line d->model =
(model ? model : QAbstractItemModelPrivate::staticEmptyModel());
in method QAbstractItemView::setModel)

Change-Id: I6f01bdeac64495ee4a76adcc7bf8da8a7719ef4d
Reviewed-by: David Faure <david.faure@kdab.com>
2017-08-04 08:36:29 +00:00
Frederik Gladhorn
e5cdb966bf Ignore tests that fail on OpenNebula
These tests need fixing, but they are already partially blacklisted
and need investigation once the switch is completed.

Task-number: QTQAINFRA-1292
Task-number: QTQAINFRA-1355
Task-number: QTQAINFRA-1362
Change-Id: Ic50d0c4a01ee7e72be1129d418eff244ba783185
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 09:30:06 +00:00
Joni Jäntti
8561281768 tst_qwidget::activation expect fail on Win 10
This test fails on Windows 10 x64 Creators Update CI builds for unknown reasons.

Change-Id: I766bccfd4dea9ea195c68403018b419e800a7b3b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 06:58:35 +00:00
Joni Jäntti
3d5bf00f18 tst_qgraphicswidget expect fail on Win 10
tst_qgraphicswidget::checkReason_ActiveWindow fails on Windows 10
Creators Update. Added expect fail for Windows platform.

Task-number: QTBUG-62244
Change-Id: I71868a496659e7136af9a5b74684ba39edaf03ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 06:58:27 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Simon Hausmann
d1d2ca2b41 Ignore hanging tst_qinputdialog::getInt/getDouble() test on macOS 10.12
Change-Id: I495cd98144ba9145e44a9ee5cb8748ae97a6166f
Task-number: QTQAINFRA-1356
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-02 15:49:53 +00:00
Simon Hausmann
f3ca13f3d1 Ignore failures of showMinimizedKeepsFocus/activateWindow on macOS 10.12
Change-Id: I1b5823b48c5dd5bebb8172fd696fc521b7de75b2
Task-number: QTQAINFRA-1359
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-02 15:49:23 +00:00
Simon Hausmann
30d32ae72c Ignore failures of submenuTearOffDontClose on macOS 10.12
Change-Id: Ie3409da033325aea832907579d4d61dfd3610e7a
Task-number: QTQAINFRA-1358
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-02 15:49:18 +00:00
Soroush Rabiei
5e1408bd0d Test locale propagation from date-time editor to its calendar popup
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Task-number: QTBUG-59106
Change-Id: I5b79b76087f0e980de5ea4ec687e8b8e2184506f
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-28 08:14:28 +00:00
Stephan Binner
7964b7468d Convert features.tabbar to QT_[REQUIRE_]CONFIG
Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:24:02 +00:00
Stephan Binner
2d02c4c799 Convert features.dockwidget to QT_[REQUIRE_]CONFIG
Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:58 +00:00
Tor Arne Vestbø
185d87708b Fix tst_QAbstractItemView::task200665_itemEntered
Moving the cursor is not synchronous.

Change-Id: I6b820af026585e1fcfef845cc712fa8f6812e941
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 10:54:40 +00:00
Andy Shaw
fcfee98f62 QLineEdit: Don't move the cursor after internalInsert() has done so
internalInsert() will set the cursor to the right position which accounts
for any input mask set on the control as well. Therefore it will already
be placed at the next correct position and should not be changed again
after that.

Task-number: QTBUG-40943
Change-Id: Ic0f5fad6999ddd367e435ec4409a5db5b9eacb7b
Reviewed-by: Daniel Teske <qt@squorn.de>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-24 09:51:17 +00:00
Tor Arne Vestbø
593719aab5 macOS: Blacklist flakey test tst_QMenu::tearOff()
Change-Id: Id220f10f4ff756230155c7c8f37713d53ed3ca0c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-24 03:49:37 +00:00
Tor Arne Vestbø
58685a48a6 macOS: Blacklist tst_QMenu::pushButtonPopulateOnAboutToShow
It's flakey/failing on macOS, the menu is opened but opened above
the button, so the intersection test fails.

Change-Id: I6b13a1b0df2b07fa36bbb73071cdeb55547ac93a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-24 03:49:30 +00:00
Frank Meerkoetter
c4e8726042 Fix warning about self assign
...tst_qlineedit.cpp:1938:9: warning: explicitly assigning value of variable of type 'Qt::Key' to itself
-Wself-assign]
    key = key;
    ~~~ ^ ~~~

Change-Id: I18a46f61e13f6e2c74edce869a1c36a7f3a0fb70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-23 12:18:03 +00:00
Tor Arne Vestbø
f948f96e91 macOS: Blacklist tst_QComboBox::task_QTBUG_56693_itemFontFromModel
Counting draw calls in the style is not a reliable way to count
italic items in the combobox.

Task-number: QTBUG-62080
Change-Id: I6cb6d54535f073f66cfcf61bb19eb645284c835d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-22 06:22:26 +00:00
Tor Arne Vestbø
ab5c28ac55 Fix tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet
Don't assume signals will not be emitted during show. The test should
focus on testing that changing the model results in change signals. What
happens before that is not under test, and not stable.

Change-Id: I71e62abc15fc81c069d7685e4342e795449c3632
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-21 22:10:28 +00:00
Tor Arne Vestbø
2e3e8cec89 macOS: Blacklist tst_QMenu::layoutDirection
It's failing when enabling synchronous expose events, but likely
due to making assumptions about expose behavior. Will be looked
at in more detail once the expose event patch is in, so we can
move forward.

Task-number: QTBUG-62092
Change-Id: Ie76b5f11ccf841981a42d2eda19fbcda8b43c36c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-21 13:31:19 +00:00
Daniel Teske
854fdaaf76 QLineEdit: Add selectionEnd() and selectionLength()
Getting the end position of the selection was not possible.

[ChangeLog][QtWidgets][QLineEdit] Added selectionEnd(), selectionLength(),
complementing selectionStart().

Change-Id: Iaecc624063d7c043f9502351f07eb76f869e86f1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-20 13:46:26 +00:00
Sergio Martins
29f6b50732 Windows: Don't raise inactive windows when showing a tooltip
The Qt4 Q_WS_WIN ifdef never got ported.

Change-Id: Iad1ca1a3e20bd5254895781eee09897520b7d7d1
Task-Id: QTBUG-39147
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-19 14:21:52 +00:00
Marc Mutz
94cf203f36 Use QSharedPointer::create() more
This is the result of running the (experimental) clang-tidy check
   qt-modernize-qsharedpointer-create

Discarded changes:

- tst_qsharedpointer.cpp: not sure we want these replacements there
  (→ separate change)
- tst_collations.cpp: hit in a template specialization that is
  instantiated with both QSharedPointer and QSharedDataPointer.

Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-19 13:40:42 +00:00
Friedemann Kleint
a9dfdbd06a tst_QStyle::drawItemPixmap(): Check on the image color
Verify that all pixels of the grabbed image are green instead
of comparing an image loaded from file.
The test then also passes when High DPI scaling is active in
which case a twice as big pixmap with DPR=2 is obtained when
grabbing the widget.

Change-Id: Ie5244a39a68ea0defd2590cf30f251d660d0869b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-19 07:33:38 +00:00
Friedemann Kleint
1b190e7ea6 tst_QWidget: Fix to pass with High DPI scaling enabled
Scale coordinates in a few places, remove pixmap scaling in
grabWindow() (Windows).

Change-Id: Iba9e5d3ca55422a14eda09c8d04329a455d3acb3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-19 07:32:55 +00:00
Tor Arne Vestbø
46001e6f49 Blacklist tst_QWidget::setToolTip on all macOS platforms
It's broken due to tst_QWidget::testDeletionInEventHandlers,
but the root cause is not known yet.

Task-number: QTBUG-61986
Change-Id: I5b77efaf6910123d10a1456c54b873100e538a69
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-17 16:42:33 +00:00
Tor Arne Vestbø
b2cb4c73d3 Stabilize tst_QWidget::setMaskInResizeEvent on OS X 10.10
Change-Id: I7dbe9c7a91301e0002f9e1827f6d0b495d2b9ec5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-17 13:10:31 +00:00