qt5base-lts/tests/auto/widgets
Olivier Goffart 1d9270ee42 Fix DPI of QWidget with parent on a different screen
If a floating QWidget has a parent on a different screen, its DPI was
still inherited from the parent instead of taken from the screen.

The only reason we did was in case there is a customDpi set.
(customDpi is a private thing that is only used in designer to change
the appearance of the previewed widget)

So instead of recursing into QWidget::metric for each ancestor, just
use a for loop to find if one parent has a customDpi. If no customDpi
is found, then return the DPI of the right screen.

Task-number: QTBUG-58959
Task-number: QTBUG-48242
Change-Id: Ie6e9e48cdd10234994c0919ba3aea9b0cdb52494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-02 16:43:38 +00:00
..
dialogs Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-08 15:49:18 +01:00
effects QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
gestures autotests: use QTest::createTouchDevice() 2016-06-10 13:07:17 +00:00
graphicsview tst_qgraphicsview: use new QTest::addRow() more 2017-01-26 10:31:36 +00:00
itemviews Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-08 15:49:18 +01:00
kernel Fix DPI of QWidget with parent on a different screen 2017-03-02 16:43:38 +00:00
styles tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
util Added isObsolete and setObsolete functions in QUndoStack 2017-01-02 13:31:25 +00:00
widgets Widgets: Replace LGPL21 with LGPL license header 2017-02-28 15:34:14 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00