diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-08-13 16:00:13 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-17 19:04:39 +0000 |
commit | fcdd613dbeb9945604f15c164b4c97aba4f195a0 (patch) | |
tree | c9bab0f2f4cc93d31c3f9a2ad564e8bd0d4f74e2 /examples | |
parent | 841128d48120a2f3cbc26bce6bd25c900c99a7cf (diff) |
Use qEnvironmentVariableIntValue() instead of qgetenv().toInt()
The docs tell us that it's faster.
Change-Id: Ib828ed9a10bbb617670a61e7525cbbe25704815d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit ca89437d00aeb8916738a964a62aef3cff7dc5ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/shared/shared.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/shared/shared.h b/examples/quick/shared/shared.h index a6a468ddcb..b6c7c4a45b 100644 --- a/examples/quick/shared/shared.h +++ b/examples/quick/shared/shared.h @@ -59,13 +59,13 @@ app.setOrganizationDomain("qt-project.org");\ app.setApplicationName(QFileInfo(app.applicationFilePath()).baseName());\ QQuickView view;\ - if (qgetenv("QT_QUICK_CORE_PROFILE").toInt()) {\ + if (qEnvironmentVariableIntValue("QT_QUICK_CORE_PROFILE")) {\ QSurfaceFormat f = view.format();\ f.setProfile(QSurfaceFormat::CoreProfile);\ f.setVersion(4, 4);\ view.setFormat(f);\ }\ - if (qgetenv("QT_QUICK_MULTISAMPLE").toInt()) {\ + if (qEnvironmentVariableIntValue("QT_QUICK_MULTISAMPLE")) {\ QSurfaceFormat f = view.format();\ f.setSamples(4);\ view.setFormat(f);\ |