summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreen.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-09 11:48:01 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-12 09:58:56 +0200
commit1dce3b7d11a0e61a779dc41297b3fd55a09c50e0 (patch)
tree95744830a05e531d0348f48cd43263bea6188f2e /src/plugins/platforms/qnx/qqnxscreen.cpp
parent0a94712ad52b7f1d61619eeff8329696f477a969 (diff)
QNX: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I211d6de32da06bf465c4f721f39d73289206745f Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 59dc84ebc8..339ed06b8e 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -313,7 +313,7 @@ static int defaultDepth()
if (defaultDepth == 0) {
// check if display depth was specified in environment variable;
// use default value if no valid value found
- defaultDepth = qgetenv("QQNX_DISPLAY_DEPTH").toInt();
+ defaultDepth = qEnvironmentVariableIntValue("QQNX_DISPLAY_DEPTH");
if (defaultDepth != 16 && defaultDepth != 32)
defaultDepth = 32;
}
@@ -687,7 +687,7 @@ void QQnxScreen::adjustOrientation()
return;
bool ok = false;
- const int rotation = qgetenv("ORIENTATION").toInt(&ok);
+ const int rotation = qEnvironmentVariableIntValue("ORIENTATION", &ok);
if (ok)
setRotation(rotation);
@@ -866,7 +866,7 @@ void QQnxScreen::setRootWindow(QQnxWindow *window)
{
// Optionally disable the screen power save
bool ok = false;
- const int disablePowerSave = qgetenv("QQNX_DISABLE_POWER_SAVE").toInt(&ok);
+ const int disablePowerSave = qEnvironmentVariableIntValue("QQNX_DISABLE_POWER_SAVE", &ok);
if (ok && disablePowerSave) {
const int mode = SCREEN_IDLE_MODE_KEEP_AWAKE;
int result = screen_set_window_property_iv(window->nativeHandle(), SCREEN_PROPERTY_IDLE_MODE, &mode);