aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-11-25 14:22:15 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-30 09:45:11 +0100
commitca5e643ea9d2878f4a00546ed63a004e10da6ae0 (patch)
treebf6491027a94dd208ee4f0816c1901a8e3682a2e
parent437f268f562fa6024c6080db6651c97572cd4acc (diff)
Make effectiveDevicePixelRatio() return a qreal.
Fractional scale factors are not as broken as previously believed, especially for Qt Quick. Keep the door open for finding a way to support it at some point in the future. Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r--src/quick/items/qquickwindow.cpp2
-rw-r--r--src/quick/items/qquickwindow.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 262e227b16..10e63430ae 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -3945,7 +3945,7 @@ void QQuickWindow::runJobsAfterSwap()
*
* \sa QWindow::devicePixelRatio()
*/
-int QQuickWindow::effectiveDevicePixelRatio() const
+qreal QQuickWindow::effectiveDevicePixelRatio() const
{
QWindow *w = QQuickRenderControl::renderWindowFor(const_cast<QQuickWindow *>(this));
return w ? w->devicePixelRatio() : devicePixelRatio();
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 3cac691963..ddf9722313 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -142,7 +142,7 @@ public:
void scheduleRenderJob(QRunnable *job, RenderStage schedule);
- int effectiveDevicePixelRatio() const;
+ qreal effectiveDevicePixelRatio() const;
Q_SIGNALS:
void frameSwapped();