Q_ASSERT(connect(obj1,SIGNAL(signal(int)),obj2,SLOT(slot(int))))
Q_ASSERT(QMetaObject::invokeMethod(obj,"method",Q_ARG(QString,str))).
#ifdef QT_NO_DEBUG#define Q_EXEC(q) {q.exec();}#else#define Q_EXEC(q) { \ if (!q.exec()) \ { \ QMap<QString,QVariant> bv = q.boundValues(); \ QString sbv; \ for(typeof(bv)::const_iterator i = bv.constBegin(); \ i != bv.constEnd(); ++i) \ sbv += i.key() + ":=" + i.value().toString() + "\n"; \ qFatal("Query failed in function:%s\ntext: '%s'\nboundValues:\n%s\nreason: '%s'", \ Q_FUNC_INFO, \ qPrintable(q.lastQuery()), \ qPrintable(sbv), \ qPrintable(q.lastError().text()) \ ); \ } \}#endif
inline void qt_noop() {}Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line);#if !defined(Q_ASSERT)# ifndef QT_NO_DEBUG# define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop())# else# define Q_ASSERT(cond) qt_noop()# endif#endif