summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-12-01 11:26:31 +0100
committerMorten Johan Sørvig <morten.sorvig@digia.com>2015-03-26 11:01:28 +0100
commitdee0daa89a5800745790d43cdcaa3c6377e3ac3d (patch)
treedf62f546539355ff1514aea724adb629effc7108 /src/gui/kernel/qhighdpiscaling.cpp
parent35075e7db476da4fb77673d9cb5e1c8dd5da8c74 (diff)
WIP: Add logging via category "qt.scaling"
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling.cpp')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
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;
}