summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglconvenience.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-09 11:45:38 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-12 09:58:15 +0200
commitf88c5415ffac69d51c82489908a18f9b88190f59 (patch)
tree945aaa1ba7aa42f139b500973fe10c11ebacecdf /src/platformsupport/eglconvenience/qeglconvenience.cpp
parent9f0d5b3b6cf61008abad340f18c543d6c109a0a8 (diff)
eglconvenience: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: Id50609c1f3511287d99e24b03e48c0a254893194 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglconvenience.cpp')
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index 5eed47050f..ca8f1bc333 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -465,8 +465,8 @@ QSizeF q_physicalScreenSizeFromFb(int framebufferDevice, const QSize &screenSize
if (size.isEmpty()) {
// Note: in millimeters
- int width = qgetenv("QT_QPA_EGLFS_PHYSICAL_WIDTH").toInt();
- int height = qgetenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT").toInt();
+ int width = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_WIDTH");
+ int height = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_HEIGHT");
if (width && height) {
size.setWidth(width);
@@ -507,8 +507,8 @@ QSize q_screenSizeFromFb(int framebufferDevice)
static QSize size;
if (size.isEmpty()) {
- int width = qgetenv("QT_QPA_EGLFS_WIDTH").toInt();
- int height = qgetenv("QT_QPA_EGLFS_HEIGHT").toInt();
+ int width = qEnvironmentVariableIntValue("QT_QPA_EGLFS_WIDTH");
+ int height = qEnvironmentVariableIntValue("QT_QPA_EGLFS_HEIGHT");
if (width && height) {
size.setWidth(width);
@@ -539,7 +539,7 @@ QSize q_screenSizeFromFb(int framebufferDevice)
int q_screenDepthFromFb(int framebufferDevice)
{
const int defaultDepth = 32;
- static int depth = qgetenv("QT_QPA_EGLFS_DEPTH").toInt();
+ static int depth = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DEPTH");
if (depth == 0) {
struct fb_var_screeninfo vinfo;