QtDBus: use qEnvironmentVariableIntValue()

It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: Ib0c0f903531a3a656919e87df8065a9c6c7a666c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2014-09-09 11:44:21 +02:00
parent 47870f02f7
commit f93870ed44

View File

@ -1022,7 +1022,7 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
{
static const bool threads = q_dbus_threads_init_default();
if (::isDebugging == -1)
::isDebugging = qgetenv("QDBUS_DEBUG").toInt();
::isDebugging = qEnvironmentVariableIntValue("QDBUS_DEBUG");
Q_UNUSED(threads)
#ifdef QDBUS_THREAD_DEBUG