summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h3
2 files changed, 8 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;
}
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index bfa50f593a..8b10311c69 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -46,6 +46,7 @@
#include <QtCore/qmargins.h>
#include <QtCore/qrect.h>
#include <QtCore/qvector.h>
+#include <QtCore/qloggingcategory.h>
#include <QtGui/qregion.h>
// This file implmements utility functions for high-dpi scaling on operating
@@ -73,6 +74,8 @@
QT_BEGIN_NAMESPACE
+Q_DECLARE_LOGGING_CATEGORY(lcScaling);
+
class Q_GUI_EXPORT QHighDpiScaling {
public:
static bool isActive() { return m_active; }