summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-08-07 00:10:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-14 20:21:06 +0200
commit0bd21a8111f3ec3a515f4c9d1587e6770f229275 (patch)
tree72ea05b06b988d87634287ef71e3e0c8b94da616 /src/corelib/kernel
parent11b5825fa08f386d3475fa181d8d3b8738e9cd12 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp2
2 files changed, 2 insertions, 2 deletions
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())