C++: Replace non-absolute-critical asserts for soft ones

Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Leandro Melo
2012-01-23 17:44:49 +01:00
committed by hjk
parent 918131b6e7
commit efe9bca20c
13 changed files with 39 additions and 24 deletions

View File

@@ -95,7 +95,7 @@ public:
InsertionPointLocator locator(refactoring);
const InsertionLocation loc = locator.methodDeclarationInClass(
m_targetFileName, m_targetSymbol, m_xsSpec);
Q_ASSERT(loc.isValid());
QTC_ASSERT(loc.isValid(), return);
CppRefactoringFilePtr targetFile = refactoring.file(m_targetFileName);
int targetPosition1 = targetFile->position(loc.line(), loc.column());
@@ -120,12 +120,12 @@ private:
Class *isMemberFunction(const LookupContext &context, Function *function)
{
Q_ASSERT(function);
QTC_ASSERT(function, return 0);
Scope *enclosingScope = function->enclosingScope();
while (! (enclosingScope->isNamespace() || enclosingScope->isClass()))
enclosingScope = enclosingScope->enclosingScope();
Q_ASSERT(enclosingScope != 0);
QTC_ASSERT(enclosingScope != 0, return 0);
const Name *functionName = function->name();
if (! functionName)
@@ -245,7 +245,7 @@ public:
void performChanges(const CppRefactoringFilePtr &,
const CppRefactoringChanges &refactoring)
{
Q_ASSERT(m_loc.isValid());
QTC_ASSERT(m_loc.isValid(), return);
CppRefactoringFilePtr targetFile = refactoring.file(m_loc.fileName());