diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-09-09 11:47:13 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-12 09:58:40 +0200 |
commit | 9b62d37894b583714e06bc89c98f4831a6ede4d9 (patch) | |
tree | 4dbb5995e4236912da79f577d4468a41518fcfd8 /src/plugins/platforms/eglfs | |
parent | 4aba06aa472584113c01b2c8fb93301a53f5845b (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')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_x11.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.cpp | 2 |
3 files changed, 4 insertions, 4 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) diff --git a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp index a3f94fb5b4..4bb0c6123c 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp @@ -321,7 +321,7 @@ EGLNativeWindowType QEglFSX11Hooks::createNativeWindow(QPlatformWindow *platform xcb_change_property(m_connection, XCB_PROP_MODE_REPLACE, m_window, m_atoms[Atoms::WM_PROTOCOLS], XCB_ATOM_ATOM, 32, 1, &m_atoms[Atoms::WM_DELETE_WINDOW]); - if (qgetenv("EGLFS_X11_FULLSCREEN").toInt()) { + if (qEnvironmentVariableIntValue("EGLFS_X11_FULLSCREEN")) { // Go fullscreen. The QScreen and QWindow size is controlled by EGLFS_X11_SIZE regardless, // this is just the native window. xcb_change_property(m_connection, XCB_PROP_MODE_REPLACE, m_window, diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index 82269d07c6..333578e7ac 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE QEglFSIntegration::QEglFSIntegration() { - mDisableInputHandlers = qgetenv("QT_QPA_EGLFS_DISABLE_INPUT").toInt(); + mDisableInputHandlers = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DISABLE_INPUT"); initResources(); } |