diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-31 18:50:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-03 18:07:49 +0000 |
commit | 6f470b5aa6427b47a9ff54cbff2c88fde6323654 (patch) | |
tree | a289965ea7ca9f44380515483447259b2df6c86d /src/gui/text | |
parent | 5481306fd94e7579c50d67ab28233b67e7aee721 (diff) |
QGuiApplication: invert meaning of qt_is_gui_used
The default value was true, which is non-zero, forcing the variable
out of the BSS and into the DATA segment.
Fix by inverting the meaning so the default value can be false.
Since qt_is_gui_unused sounds a bit complicated, however, take a cue
from the variable's only writer and rename it qt_is_tty_app.
Change-Id: I198e9786f7e71178d69fecb5179287bf39b3a1d6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 961f5a6fa22b338c975d81c959c502322fdb64af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfont.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index ae0c495dcf..f663ac56fd 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -136,14 +136,14 @@ bool QFontDef::exactMatch(const QFontDef &other) const ); } -extern bool qt_is_gui_used; +extern bool qt_is_tty_app; Q_GUI_EXPORT int qt_defaultDpiX() { if (QCoreApplication::instance()->testAttribute(Qt::AA_Use96Dpi)) return 96; - if (!qt_is_gui_used) + if (qt_is_tty_app) return 75; if (const QScreen *screen = QGuiApplication::primaryScreen()) @@ -158,7 +158,7 @@ Q_GUI_EXPORT int qt_defaultDpiY() if (QCoreApplication::instance()->testAttribute(Qt::AA_Use96Dpi)) return 96; - if (!qt_is_gui_used) + if (qt_is_tty_app) return 75; if (const QScreen *screen = QGuiApplication::primaryScreen()) |