summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-09 11:47:13 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-12 09:58:40 +0200
commit9b62d37894b583714e06bc89c98f4831a6ede4d9 (patch)
tree4dbb5995e4236912da79f577d4468a41518fcfd8 /src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
parent4aba06aa472584113c01b2c8fb93301a53f5845b (diff)
eglfs: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I4c43809954ed720de95b3056c13bf520577e3280 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfshooks_stub.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
index 5405db7959..d270be9850 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
@@ -145,7 +145,7 @@ QSurfaceFormat QEglFSHooks::surfaceFormatFor(const QSurfaceFormat &inputFormat)
{
QSurfaceFormat format = inputFormat;
- static const bool force888 = qgetenv("QT_QPA_EGLFS_FORCE888").toInt();
+ static const bool force888 = qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCE888");
if (force888) {
format.setRedBufferSize(8);
format.setGreenBufferSize(8);
@@ -189,7 +189,7 @@ QEGLPlatformCursor *QEglFSHooks::createCursor(QPlatformScreen *screen) const
void QEglFSHooks::waitForVSync() const
{
#if defined(FBIO_WAITFORVSYNC)
- static const bool forceSync = qgetenv("QT_QPA_EGLFS_FORCEVSYNC").toInt();
+ static const bool forceSync = qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCEVSYNC");
if (forceSync && framebuffer != -1) {
int arg = 0;
if (ioctl(framebuffer, FBIO_WAITFORVSYNC, &arg) == -1)