From f813a3e8ad65f6a38da866dff7683650abff334d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 10 Oct 2014 12:16:36 +0200 Subject: 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 --- src/platformsupport/eglconvenience/qeglconvenience.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/platformsupport/eglconvenience') 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; -- cgit v1.2.3