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 /tests | |
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 'tests')
-rw-r--r-- | tests/auto/quickcontrols2/snippets/tst_snippets.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quickcontrols2/snippets/tst_snippets.cpp b/tests/auto/quickcontrols2/snippets/tst_snippets.cpp index 17ae6aa614..6be53d274e 100644 --- a/tests/auto/quickcontrols2/snippets/tst_snippets.cpp +++ b/tests/auto/quickcontrols2/snippets/tst_snippets.cpp @@ -79,7 +79,7 @@ void tst_Snippets::initTestCase() QDir screenshotsDir(QDir::current().filePath("screenshots")); - takeScreenshots = qgetenv("SCREENSHOTS").toInt(); + takeScreenshots = qEnvironmentVariableIntValue("SCREENSHOTS"); if (takeScreenshots) QVERIFY(screenshotsDir.exists() || QDir::current().mkpath("screenshots")); diff --git a/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp b/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp index bbcb24ca38..ea2a63dc52 100644 --- a/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp @@ -42,7 +42,7 @@ using namespace QQuickVisualTestUtil; -static int qt_verbose = qgetenv("VERBOSE").toInt() != 0; +static int qt_verbose = qEnvironmentVariableIntValue("VERBOSE") != 0; Q_GLOBAL_STATIC(QObjectList, qt_qobjects) |