diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-10-10 12:16:36 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-10-10 12:48:30 +0200 |
commit | f813a3e8ad65f6a38da866dff7683650abff334d (patch) | |
tree | 934fc9d4d1028ae37aef431632f7c351b5c481a7 /src | |
parent | 26c104d120aff93f9da24dfeba3b64864d9f6a37 (diff) |
Print warning when unable to query physical screen size
This warning was removed when re-factoring code in:
328f2f9c35f3cc5e7049a060a608c3f72876484a
Change-Id: I5a9d7fbbf2b78e6e80a79478f4e9fb08ccaec431
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglconvenience.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp index b7ce6dfaf3..1fdeec3adb 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -487,6 +487,11 @@ QSizeF q_physicalScreenSizeFromFb(int framebufferDevice, const QSize &screenSize size.setWidth(w <= 0 ? screenResolution.width() * Q_MM_PER_INCH / defaultPhysicalDpi : qreal(w)); size.setHeight(h <= 0 ? screenResolution.height() * Q_MM_PER_INCH / defaultPhysicalDpi : qreal(h)); + + if (w <= 0 || h <= 0) + qWarning("Unable to query physical screen size, defaulting to %d dpi.\n" + "To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH " + "and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).", defaultPhysicalDpi); } return size; |