summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2012-01-23 17:44:49 +0100
committerhjk <qthjk@ovi.com>2012-01-24 09:58:59 +0100
commitefe9bca20c2569f039f0193c6572d88dc024cd3d (patch)
tree3f5173f35c94a6f93f0df32c46478c861b3fcf33 /src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
parent918131b6e7d8f6db583a8c056749efa675761111 (diff)
downloadqt-creator-efe9bca20c2569f039f0193c6572d88dc024cd3d.tar.gz
C++: Replace non-absolute-critical asserts for soft ones
Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/cppeditor/cppinsertqtpropertymembers.cpp')
-rw-r--r--src/plugins/cppeditor/cppinsertqtpropertymembers.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp b/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
index 2834ec3720..49653864fd 100644
--- a/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
+++ b/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
@@ -42,6 +42,8 @@
#include <cppeditor/cppquickfix.h>
#include <coreplugin/ifile.h>
+#include <utils/qtcassert.h>
+
#include <QtCore/QTextStream>
using namespace CPlusPlus;
@@ -159,7 +161,7 @@ void InsertQtPropertyMembers::Operation::performChanges(const CppRefactoringFile
const QString getterDeclaration = typeName + QLatin1Char(' ') + m_getterName +
QLatin1String("() const\n{\nreturn ") + m_storageName + QLatin1String(";\n}\n");
InsertionLocation getterLoc = locator.methodDeclarationInClass(file->fileName(), m_class, InsertionPointLocator::Public);
- Q_ASSERT(getterLoc.isValid());
+ QTC_ASSERT(getterLoc.isValid(), return);
insertAndIndent(file, &declarations, getterLoc, getterDeclaration);
}
@@ -176,7 +178,7 @@ void InsertQtPropertyMembers::Operation::performChanges(const CppRefactoringFile
<< " = arg;\nemit " << m_signalName << "(arg);\n}\n}\n";
}
InsertionLocation setterLoc = locator.methodDeclarationInClass(file->fileName(), m_class, InsertionPointLocator::PublicSlot);
- Q_ASSERT(setterLoc.isValid());
+ QTC_ASSERT(setterLoc.isValid(), return);
insertAndIndent(file, &declarations, setterLoc, setterDeclaration);
}
@@ -185,7 +187,7 @@ void InsertQtPropertyMembers::Operation::performChanges(const CppRefactoringFile
const QString declaration = QLatin1String("void ") + m_signalName + QLatin1Char('(')
+ typeName + QLatin1String(" arg);\n");
InsertionLocation loc = locator.methodDeclarationInClass(file->fileName(), m_class, InsertionPointLocator::Signals);
- Q_ASSERT(loc.isValid());
+ QTC_ASSERT(loc.isValid(), return);
insertAndIndent(file, &declarations, loc, declaration);
}
@@ -194,7 +196,7 @@ void InsertQtPropertyMembers::Operation::performChanges(const CppRefactoringFile
const QString storageDeclaration = typeName + QLatin1String(" m_")
+ propertyName + QLatin1String(";\n");
InsertionLocation storageLoc = locator.methodDeclarationInClass(file->fileName(), m_class, InsertionPointLocator::Private);
- Q_ASSERT(storageLoc.isValid());
+ QTC_ASSERT(storageLoc.isValid(), return);
insertAndIndent(file, &declarations, storageLoc, storageDeclaration);
}