diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-12-01 11:26:31 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@digia.com> | 2015-03-26 11:01:28 +0100 |
commit | dee0daa89a5800745790d43cdcaa3c6377e3ac3d (patch) | |
tree | df62f546539355ff1514aea724adb629effc7108 /src/gui/kernel/qhighdpiscaling.cpp | |
parent | 35075e7db476da4fb77673d9cb5e1c8dd5da8c74 (diff) |
WIP: Add logging via category "qt.scaling"
Change-Id: Ia94ba9a8961f1a31635135545ded0078a93de380
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling.cpp')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index c76ac9b590..8ea1735cd1 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcScaling, "qt.scaling"); + static inline qreal initialScaleFactor() { static const char envVar[] = "QT_SCALE_FACTOR"; @@ -56,8 +58,10 @@ static inline qreal initialScaleFactor() if (qEnvironmentVariableIsSet(envVar)) { bool ok; const qreal f = qgetenv(envVar).toDouble(&ok); - if (ok && f > 0) + if (ok && f > 0) { + qCDebug(lcScaling) << "Apply QT_SCALE_FACTOR" << f; result = f; + } } return result; } |