From b3c991ae8f9da6d8eb26f10b3d4ab08587588c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 1 Sep 2020 13:45:24 +0200 Subject: Port from devicePixelRatioF() to devicePixelRatio() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø --- examples/widgets/widgets/tablet/tabletcanvas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/widgets/widgets/tablet/tabletcanvas.cpp') diff --git a/examples/widgets/widgets/tablet/tabletcanvas.cpp b/examples/widgets/widgets/tablet/tabletcanvas.cpp index 9215d5b10c..e397d70cd6 100644 --- a/examples/widgets/widgets/tablet/tabletcanvas.cpp +++ b/examples/widgets/widgets/tablet/tabletcanvas.cpp @@ -133,7 +133,7 @@ void TabletCanvas::tabletEvent(QTabletEvent *event) //! [4] void TabletCanvas::initPixmap() { - qreal dpr = devicePixelRatioF(); + qreal dpr = devicePixelRatio(); QPixmap newPixmap = QPixmap(qRound(width() * dpr), qRound(height() * dpr)); newPixmap.setDevicePixelRatio(dpr); newPixmap.fill(Qt::white); @@ -149,8 +149,8 @@ void TabletCanvas::paintEvent(QPaintEvent *event) if (m_pixmap.isNull()) initPixmap(); QPainter painter(this); - QRect pixmapPortion = QRect(event->rect().topLeft() * devicePixelRatioF(), - event->rect().size() * devicePixelRatioF()); + QRect pixmapPortion = QRect(event->rect().topLeft() * devicePixelRatio(), + event->rect().size() * devicePixelRatio()); painter.drawPixmap(event->rect().topLeft(), m_pixmap, pixmapPortion); } //! [4] -- cgit v1.2.3