[frameworks/kirigami] src/platform: Units::eventFilter: fix to react just to font change of app instance
Friedrich W. H. Kossebau <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 668a12d4c3faaafd3438065ff315902912c5dd3b by Friedrich W. H. Kossebau.
Committed on 17/08/2026 at 18:19.
Pushed by kossebau into branch 'master'.
Units::eventFilter: fix to react just to font change of app instance
M +1 -1 src/platform/units.cpp
https://invent.kde.org/frameworks/kirigami/-/commit/668a12d4c3faaafd3438065ff315902912c5dd3b
diff --git a/src/platform/units.cpp b/src/platform/units.cpp
index 7732c5c8a..9d87bd3c4 100644
--- a/src/platform/units.cpp
+++ b/src/platform/units.cpp
@@ -271,7 +271,7 @@ Units *Units::create(QQmlEngine *qmlEngine, [[maybe_unused]] QJSEngine *jsEngine
bool Units::eventFilter([[maybe_unused]] QObject *watched, QEvent *event)
{
- if (event->type() == QEvent::ApplicationFontChange) {
+ if ((event->type() == QEvent::ApplicationFontChange) && (watched == qGuiApp)) {
d->fontMetrics = QFontMetricsF(qGuiApp->font());
if (d->customUnitsSet) {