diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-11-25 14:22:15 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-30 09:45:11 +0100 |
commit | ca5e643ea9d2878f4a00546ed63a004e10da6ae0 (patch) | |
tree | bf6491027a94dd208ee4f0816c1901a8e3682a2e | |
parent | 437f268f562fa6024c6080db6651c97572cd4acc (diff) | |
download | qtdeclarative-ca5e643ea9d2878f4a00546ed63a004e10da6ae0.tar.gz qtdeclarative-ca5e643ea9d2878f4a00546ed63a004e10da6ae0.tar.bz2 qtdeclarative-ca5e643ea9d2878f4a00546ed63a004e10da6ae0.zip |
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.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickwindow.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 262e227b1..10e63430a 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 3cac69196..ddf972231 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(); |