Remove Q_ASSERT's from qsharedmemory autotest

Report a fatal error rather than ignoring the error in non-debug builds.

Change-Id: Ib6ef993e6e0c65bd9adea994ea7b454cc147f3d4
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 637456edef085d1825f15429cd921f2f0d4bd6a2)
bb10
Jason McDonald 2011-05-11 12:00:40 +10:00 committed by Rohan McGovern
parent 719ba0ea3a
commit 1661205dd7
2 changed files with 4 additions and 2 deletions

View File

@ -207,7 +207,8 @@ bool QSystemLockPrivate::modifySemaphore(QSystemLockPrivate::Operation op,
if ((lockCount == 0 && op == Lock) || (lockCount > 0 && op == Unlock)) {
if (op == Unlock) {
--lockCount;
Q_ASSERT(lockCount >= 0);
if (lockCount < 0)
qFatal("%s: lockCount must not be negative", Q_FUNC_INFO);
if (lockCount > 0)
return true;
}

View File

@ -157,7 +157,8 @@ bool QSystemLockPrivate::modifySemaphore(QSystemLockPrivate::Operation op,
if ((lockCount == 0 && op == Lock) || (lockCount > 0 && op == Unlock)) {
if (op == Unlock) {
--lockCount;
Q_ASSERT(lockCount >= 0);
if (lockCount < 0)
qFatal("%s: lockCount must not be negative", Q_FUNC_INFO);
if (lockCount > 0)
return true;
}