use QTC_ASSERT instead of Q_ASSERT

This commit is contained in:
hjk
2008-12-09 15:25:01 +01:00
parent e99d8ce3fc
commit 4a552ead9f
94 changed files with 923 additions and 673 deletions

View File

@@ -33,6 +33,8 @@
#include "classnamevalidatinglineedit.h"
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
@@ -53,7 +55,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
m_namespaceDelimiter(QLatin1String("::")),
m_namespacesEnabled(false)
{
Q_ASSERT(m_nameRegexp.isValid());
QTC_ASSERT(m_nameRegexp.isValid(), return);
}
// --------------------- ClassNameValidatingLineEdit
@@ -113,7 +115,7 @@ QString ClassNameValidatingLineEdit::createClassName(const QString &name)
// Remove spaces and convert the adjacent characters to uppercase
QString className = name;
QRegExp spaceMatcher(QLatin1String(" +(\\w)"), Qt::CaseSensitive, QRegExp::RegExp2);
Q_ASSERT(spaceMatcher.isValid());
QTC_ASSERT(spaceMatcher.isValid(), /**/);
int pos;
while ((pos = spaceMatcher.indexIn(className)) != -1) {
className.replace(pos, spaceMatcher.matchedLength(),