New QTC_CHECK warning replacing QTC_ASSERT(x, /**/)

Warn if the condition fails, but otherwise don't change the execution
flow.

Change-Id: Id7b14c745109b66960add967b2a4ef8d31e1a546
Reviewed-on: http://codereview.qt.nokia.com/2389
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Kai Koehne
2011-07-29 12:00:11 +02:00
parent c031d4564e
commit 1757228278
40 changed files with 86 additions and 83 deletions

View File

@@ -55,7 +55,7 @@
#endif
#define PRECONDITION QTC_ASSERT(!hasPython(), /**/)
#define PRECONDITION QTC_CHECK(!hasPython())
#define CB(callback) &GdbEngine::callback, STRINGIFY(callback)
@@ -543,7 +543,7 @@ void DumperHelper::evaluationParameters(const WatchData &data,
// iname="local.ob.slots.2" // ".deleteLater()"?
const int pos = data.iname.lastIndexOf('.');
const QByteArray slotNumber = data.iname.mid(pos + 1);
QTC_ASSERT(slotNumber.toInt() != -1, /**/);
QTC_CHECK(slotNumber.toInt() != -1);
extraArgs[0] = slotNumber;
}
break;
@@ -1111,7 +1111,7 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
// Do not use STRINGIFY for RTLD_NOW as we really want to expand that to a number.
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
// We are using Python on Windows and Symbian.
QTC_ASSERT(false, /**/);
QTC_CHECK(false);
#elif defined(Q_OS_MAC)
//postCommand("sharedlibrary libc"); // for malloc
//postCommand("sharedlibrary libdl"); // for dlopen