diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-12-13 13:33:11 +0000 |
---|---|---|
committer | Sérgio Martins <iamsergio@gmail.com> | 2015-12-18 21:35:08 +0000 |
commit | a5a18819d8121fa3d5a1952f478235bdca82e386 (patch) | |
tree | a1864557bb256db67295c05e391e6eaa3981c8a3 /src/network/bearer | |
parent | 1cf2620d5b87e9e429b5736073db01d0f2f4ed36 (diff) |
Use qEnvironmentVariableIntValue() instead of qgetenv().toInt().
It's much faster.
Change-Id: I55e0a23f9086fe2e7872e81dc0f5e10105ed124a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/network/bearer')
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index 71e435b771..9c761f9479 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -380,7 +380,7 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() #ifndef QT_NO_LIBRARY bool envOK = false; - const int skipGeneric = qgetenv("QT_EXCLUDE_GENERIC_BEARER").toInt(&envOK); + const int skipGeneric = qEnvironmentVariableIntValue("QT_EXCLUDE_GENERIC_BEARER", &envOK); QBearerEngine *generic = 0; QFactoryLoader *l = loader(); const PluginKeyMap keyMap = l->keyMap(); @@ -477,7 +477,7 @@ void QNetworkConfigurationManagerPrivate::startPolling() if (!pollTimer) { pollTimer = new QTimer(this); bool ok; - int interval = qgetenv("QT_BEARER_POLL_TIMEOUT").toInt(&ok); + int interval = qEnvironmentVariableIntValue("QT_BEARER_POLL_TIMEOUT", &ok); if (!ok) interval = 10000;//default 10 seconds pollTimer->setInterval(interval); |