diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-31 18:47:56 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-01 09:10:26 +0200 |
commit | 0e6ee136c91432d4ceeeda64e5a5fa88231398d4 (patch) | |
tree | 6060e002af2900007895f6efa757989dd4c190c9 /src/corelib/global/qglobal.cpp | |
parent | 418869d9158ea5cd998ba30778b0b7173b48161b (diff) | |
parent | 17294c5e4d15d5776f6e414b03671a4a9ed4993d (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/testlib/qtestblacklist.cpp
src/widgets/accessible/qaccessiblewidgets.cpp
Change-Id: If032adb9296428f62384ed835dbf41ee7a0b886c
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index abd9f4f593..3006c75794 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -3130,11 +3130,14 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) Q_DECL_NOEXCEPT return 0; } #endif - const qlonglong value = qstrtoll(buffer, Q_NULLPTR, 0, ok); + bool ok_ = true; + const qlonglong value = qstrtoll(buffer, Q_NULLPTR, 0, &ok_); if (int(value) != value) { // this is the check in QByteArray::toInt(), keep it in sync if (ok) *ok = false; return 0; + } else if (ok) { + *ok = ok_; } return int(value); } |