QtGui: use new qEnvironmentVariableIsEmpty()

In particular, static bool showRasterOverlay is safer.

Change-Id: I9df6c9a9a56d2e61b13391b6889c0ac6e259e801
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2012-08-07 00:11:51 +02:00 committed by Qt by Nokia
parent 7fa8f1efbc
commit bdd682ea4c
4 changed files with 5 additions and 5 deletions

View File

@ -204,7 +204,7 @@ QPaintEngine *QBlittablePlatformPixmap::paintEngine() const
#ifdef QT_BLITTER_RASTEROVERLAY
static bool showRasterOverlay = !qgetenv("QT_BLITTER_RASTEROVERLAY").isEmpty();
static bool showRasterOverlay = !qEnvironmentVariableIsEmpty("QT_BLITTER_RASTEROVERLAY");
void QBlittablePlatformPixmap::mergeOverlay()
{

View File

@ -54,10 +54,10 @@ enum { debug = 0 };
static inline QByteArray detectDesktopEnvironment()
{
if (!qgetenv("KDE_FULL_SESSION").isEmpty())
if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION"))
return QByteArray("KDE");
// GNOME_DESKTOP_SESSION_ID is deprecated for some reason, but still check it
if (qgetenv("DESKTOP_SESSION") == "gnome" || !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty())
if (qgetenv("DESKTOP_SESSION") == "gnome" || !qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID"))
return QByteArray("GNOME");
return QByteArray("UNKNOWN");
}

View File

@ -165,7 +165,7 @@ QCocoaIntegration::QCocoaIntegration()
NSApplication *cocoaApplication = [NSApplication sharedApplication];
if (qgetenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM").isEmpty()) {
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {
// Applications launched from plain executables (without an app
// bundle) are "background" applications that does not take keybaord
// focus or have a dock icon or task switcher entry. Qt Gui apps generally

View File

@ -147,7 +147,7 @@ void QMinimalEglScreen::createAndSetPlatformContext()
m_format = QImage::Format_RGB32;
}
if (!qgetenv("QT_QPA_EGLFS_MULTISAMPLE").isEmpty())
if (!qEnvironmentVariableIsEmpty("QT_QPA_EGLFS_MULTISAMPLE"))
platformFormat.setSamples(4);
EGLConfig config = q_configFromGLFormat(m_dpy, platformFormat);