summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
commit6630937e63ae5797487b86743a7733c8ae5cc42c (patch)
tree3d53dacf6430f9099e1fb20835881205de674961 /tests/auto/widgets/styles
parent37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff)
parentc7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff)
Merge commit 'dev' into 'wip/cmake-merge'
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp2
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index 587e8a080d..a552c91928 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -197,7 +197,7 @@ void tst_QStyle::drawItemPixmap()
const QRgb green = QColor(Qt::green).rgb();
QVERIFY(image.reinterpretAsFormat(QImage::Format_RGB32));
const QRgb *bits = reinterpret_cast<const QRgb *>(image.constBits());
- const QRgb *end = bits + image.byteCount() / sizeof(QRgb);
+ const QRgb *end = bits + image.sizeInBytes() / sizeof(QRgb);
#ifdef Q_OS_WINRT
QEXPECT_FAIL("", "QWidget::resize does not work on WinRT", Continue);
#endif
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index bfef9d2ac4..61b1fed1f8 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -741,9 +741,9 @@ void tst_QStyleSheetStyle::fontPropagation()
QCOMPARE(FONTSIZE(pb), 20);
QWidget window;
- window.setStyleSheet("* { font-size: 10pt }");
+ window.setStyleSheet("* { font-size: 9pt }");
pb.setParent(&window);
- QCOMPARE(FONTSIZE(pb), 10);
+ QCOMPARE(FONTSIZE(pb), 9);
window.setStyleSheet(QString());
QCOMPARE(FONTSIZE(pb), buttonFontSize);
@@ -2085,7 +2085,8 @@ void tst_QStyleSheetStyle::highdpiImages()
QFETCH(QColor, color);
QWidget w;
- QScreen *screen = QGuiApplication::screenAt(w.pos());
+ QScreen *screen = QGuiApplication::primaryScreen();
+ w.move(screen->availableGeometry().topLeft());
QHighDpiScaling::setScreenFactor(screen, screenFactor);
w.setStyleSheet("QWidget { background-image: url(\":/images/testimage.png\"); }");
w.show();