From 0bd21a8111f3ec3a515f4c9d1587e6770f229275 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 7 Aug 2012 00:10:11 +0200 Subject: QtCore: use new qEnvironmentVariableIs{Set,Empty}() In particular, qEmergencyOut() is now completely exception-free. Incidentally, this patch shows that Qt isn't consistent in how it treats empty environment variables used as flags, but that is something for a separate commit. This patch aims to be behaviour-preserving, except in exceptional circumstances, of course. Change-Id: Ie106e7b430e1ab086c40c81cc1e56cd0e5400cb4 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 2 +- src/corelib/kernel/qeventdispatcher_glib.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 4c1f159552..d3fb7f4018 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -350,7 +350,7 @@ void QCoreApplicationPrivate::createEventDispatcher() eventDispatcher = new QEventDispatcherBlackberry(q); # else # if !defined(QT_NO_GLIB) - if (qgetenv("QT_NO_GLIB").isEmpty() && QEventDispatcherGlib::versionSupported()) + if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && QEventDispatcherGlib::versionSupported()) eventDispatcher = new QEventDispatcherGlib(q); else # endif diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 3f75c4ec72..73abe8c374 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -293,7 +293,7 @@ static GSourceFuncs postEventSourceFuncs = { QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) : mainContext(context) { - if (qgetenv("QT_NO_THREADED_GLIB").isEmpty()) { + if (qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB")) { static QBasicMutex mutex; QMutexLocker locker(&mutex); if (!g_thread_supported()) -- cgit v1.2.3