diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-12-03 23:36:48 -0800 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-14 17:59:25 +0000 |
commit | a361e62a9fedabc7bd4c57d933bf78468fdc6795 (patch) | |
tree | 2f89965ae8d5d385c9ad28889ce50562a18f86b8 /src/quick | |
parent | 8369efcbc3c90e1712aba1ca167cac29f9c2ba97 (diff) |
Use the qEnvironmentVariable function from QtCore
This corrects the encoding of QML2_IMPORT_PATH environment variable,
since it contains paths. For the other cases, it's just improving the
code.
Task-number: QTBUG-62328
Change-Id: I0f2ce894387048f78465ffff141ca50208f6845a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index bd311d3b46..6583883d0c 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -122,14 +122,14 @@ QSGAdaptationBackendData *contextFactory() } } - if (requestedBackend.isEmpty() && qEnvironmentVariableIsSet("QMLSCENE_DEVICE")) - requestedBackend = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE")); + if (requestedBackend.isEmpty()) + requestedBackend = qEnvironmentVariable("QMLSCENE_DEVICE"); // A modern alternative. Scenegraph adaptations can represent backends // for different graphics APIs as well, instead of being specific to // some device or platform. - if (requestedBackend.isEmpty() && qEnvironmentVariableIsSet("QT_QUICK_BACKEND")) - requestedBackend = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND")); + if (requestedBackend.isEmpty()) + requestedBackend = qEnvironmentVariable("QT_QUICK_BACKEND"); // If this platform does not support OpenGL, and no backend has been set // default to the software renderer |