diff --git a/src/plugins/cppeditor/cppchecksymbols.cpp b/src/plugins/cppeditor/cppchecksymbols.cpp
index 8b1deeac605d7c61966c24cf0ec5bdbe4178ae07..e3ac38221c633b5d13a456b36ae2bfcca0a7694e 100644
--- a/src/plugins/cppeditor/cppchecksymbols.cpp
+++ b/src/plugins/cppeditor/cppchecksymbols.cpp
@@ -43,6 +43,8 @@
 #include <AST.h>
 #include <SymbolVisitor.h>
 
+#include <utils/qtcassert.h>
+
 #include <QtCore/QCoreApplication>
 #include <QtCore/QThreadPool>
 #include <QtCore/QDebug>
@@ -284,7 +286,7 @@ protected:
 
 CheckSymbols::Future CheckSymbols::go(Document::Ptr doc, const LookupContext &context)
 {
-    Q_ASSERT(doc);
+    QTC_ASSERT(doc, return Future());
 
     return (new CheckSymbols(doc, context))->start();
 }
diff --git a/src/plugins/cppeditor/cppinsertdecldef.cpp b/src/plugins/cppeditor/cppinsertdecldef.cpp
index 4a4f4ffa9e59043b439404ece1df1a22b9a8c874..62005a0d6b1930d01282086c3ae46d02429c1231 100644
--- a/src/plugins/cppeditor/cppinsertdecldef.cpp
+++ b/src/plugins/cppeditor/cppinsertdecldef.cpp
@@ -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());
 
diff --git a/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp b/src/plugins/cppeditor/cppinsertqtpropertymembers.cpp
index 2834ec3720bbc940c5864c857e0cb135a68e3d76..49653864fd7de1ad2c7d9956b6ae668e5ff16858 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);
     }
 
diff --git a/src/plugins/cppeditor/cppoutline.cpp b/src/plugins/cppeditor/cppoutline.cpp
index 0c2a592ab3b660db3c4b1deeb503531fa9dedbf9..09435037da2365aea8cf8a2b5c0da31e4c2b9651 100644
--- a/src/plugins/cppeditor/cppoutline.cpp
+++ b/src/plugins/cppeditor/cppoutline.cpp
@@ -38,6 +38,7 @@
 #include <coreplugin/ifile.h>
 #include <coreplugin/editormanager/editormanager.h>
 #include <cplusplus/OverviewModel.h>
+#include <utils/qtcassert.h>
 
 #include <QtCore/QDebug>
 #include <QtCore/QTimer>
@@ -206,7 +207,7 @@ TextEditor::IOutlineWidget *CppOutlineWidgetFactory::createWidget(Core::IEditor
 {
     CPPEditor *cppEditor = qobject_cast<CPPEditor*>(editor);
     CPPEditorWidget *cppEditorWidget = qobject_cast<CPPEditorWidget*>(cppEditor->widget());
-    Q_ASSERT(cppEditorWidget);
+    QTC_ASSERT(cppEditorWidget, return 0);
 
     CppOutlineWidget *widget = new CppOutlineWidget(cppEditorWidget);
 
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index a75ef11f16ae33c5a323c513b0917bfb47188dfc..17aa1f593c664d252a2606536c7a0811c7e4b610 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -1551,7 +1551,7 @@ private:
         virtual void performChanges(const CppRefactoringFilePtr &currentFile,
                                     const CppRefactoringChanges &)
         {
-            Q_ASSERT(fwdClass != 0);
+            QTC_ASSERT(fwdClass != 0, return);
 
             CppTools::SymbolFinder symbolFinder;
             if (Class *k =
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp
index 74d63e6256319b19f6935d43396a87ddbdc432c9..50df0e1be6e03f19744b6e5865ecf01230bc62bf 100644
--- a/src/plugins/cpptools/cppcodeformatter.cpp
+++ b/src/plugins/cpptools/cppcodeformatter.cpp
@@ -37,6 +37,7 @@
 
 #include <texteditor/basetextdocumentlayout.h>
 #include <texteditor/tabsettings.h>
+#include <utils/qtcassert.h>
 
 #include <QtCore/QDebug>
 #include <QtCore/QMetaEnum>
@@ -319,14 +320,14 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
         case else_clause:
             // ### shouldn't happen
             dump();
-            Q_ASSERT(false);
+            QTC_CHECK(false);
             leave(true);
             break;
 
         case do_statement:
             // ### shouldn't happen
             dump();
-            Q_ASSERT(false);
+            QTC_CHECK(false);
             leave(true);
             break;
 
@@ -649,7 +650,7 @@ void CodeFormatter::enter(int newState)
 
 void CodeFormatter::leave(bool statementDone)
 {
-    Q_ASSERT(m_currentState.size() > 1);
+    QTC_ASSERT(m_currentState.size() > 1, return);
     if (m_currentState.top().type == topmost_intro)
         return;
 
@@ -688,7 +689,7 @@ void CodeFormatter::leave(bool statementDone)
 void CodeFormatter::correctIndentation(const QTextBlock &block)
 {
     const int lexerState = tokenizeBlock(block);
-    Q_ASSERT(m_currentState.size() >= 1);
+    QTC_ASSERT(m_currentState.size() >= 1, return);
 
     adjustIndent(m_tokens, lexerState, &m_indentDepth, &m_paddingDepth);
 }
@@ -979,7 +980,7 @@ int CodeFormatter::tokenizeBlock(const QTextBlock &block, bool *endedJoined)
     int startState = loadLexerState(block.previous());
     if (block.blockNumber() == 0)
         startState = 0;
-    Q_ASSERT(startState != -1);
+    QTC_ASSERT(startState != -1, return 0);
 
     SimpleLexer tokenize;
     tokenize.setQtMocRunEnabled(true);
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index cd6e14be59e4546749760120f51de7b4c87f30c5..57f2d3e2d6611241f7c054ddaa19fbdb79c6af91 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -69,6 +69,7 @@
 #include <texteditor/snippets/snippet.h>
 #include <texteditor/texteditorsettings.h>
 #include <texteditor/completionsettings.h>
+#include <utils/qtcassert.h>
 
 #include <QtCore/QLatin1String>
 #include <QtGui/QTextCursor>
@@ -1250,7 +1251,7 @@ int CppCompletionAssistProcessor::startCompletionInternal(const QString fileName
     m_model->m_typeOfExpression->init(thisDocument, m_interface->snapshot());
 
     Scope *scope = thisDocument->scopeAt(line, column);
-    Q_ASSERT(scope != 0);
+    QTC_ASSERT(scope != 0, return -1);
 
     if (expression.isEmpty()) {
         if (m_model->m_completionOperator == T_EOF_SYMBOL || m_model->m_completionOperator == T_COLON_COLON) {
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 3f797943605b18dfeb7e3fd21d2c6746e59e6cda..d59191a5c1be46cb0af45c50bd37d687c298bd28 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -196,7 +196,7 @@ static void find_helper(QFutureInterface<Usage> &future,
                         Symbol *symbol)
 {
     const Identifier *symbolId = symbol->identifier();
-    Q_ASSERT(symbolId != 0);
+    QTC_ASSERT(symbolId != 0, return);
 
     const Snapshot snapshot = context.snapshot();
 
diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp
index b75fa51c0e880a1440f6ef0b64065bc8b8a8f347..2823ede93248f986df0073fb73530f3e92ac457a 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.cpp
+++ b/src/plugins/cpptools/cpprefactoringchanges.cpp
@@ -43,6 +43,7 @@
 #include <texteditor/texteditorsettings.h>
 #include <texteditor/tabsettings.h>
 #include <projectexplorer/editorconfiguration.h>
+#include <utils/qtcassert.h>
 
 #include <QtGui/QTextBlock>
 
@@ -242,7 +243,7 @@ int CppRefactoringFile::endOf(unsigned index) const
 int CppRefactoringFile::endOf(const AST *ast) const
 {
     unsigned end = ast->lastToken();
-    Q_ASSERT(end > 0);
+    QTC_ASSERT(end > 0, return -1);
     return endOf(end - 1);
 }
 
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index c08b639e47f8b4bbdb49249650322838dde207be..c21cb9b5ed83ead0afb41b3fd4282fee4ef9b2e4 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -66,6 +66,7 @@
 #include <find/ifindfilter.h>
 #include <find/searchresultwindow.h>
 #include <utils/filesearch.h>
+#include <utils/qtcassert.h>
 
 #include <QtCore/QtPlugin>
 #include <QtCore/QFileInfo>
@@ -325,7 +326,7 @@ QString CppToolsPlugin::correspondingHeaderOrSourceI(const QString &fileName) co
         }
         if (!bestFileName.isEmpty()) {
             const QFileInfo candidateFi(bestFileName);
-            Q_ASSERT(candidateFi.isFile());
+            QTC_ASSERT(candidateFi.isFile(), return QString());
             m_headerSourceMapping[fi.absoluteFilePath()] = candidateFi.absoluteFilePath();
             m_headerSourceMapping[candidateFi.absoluteFilePath()] = fi.absoluteFilePath();
             return candidateFi.absoluteFilePath();
diff --git a/src/plugins/cpptools/doxygengenerator.cpp b/src/plugins/cpptools/doxygengenerator.cpp
index 9883ceb322d8eb7e7b3af2e8a763ae0f31ab09e2..9b2e5aaee3e660903f7cc50291be1eea4034cc34 100644
--- a/src/plugins/cpptools/doxygengenerator.cpp
+++ b/src/plugins/cpptools/doxygengenerator.cpp
@@ -10,6 +10,8 @@
 #include <cplusplus/Scope.h>
 #include <cplusplus/LookupContext.h>
 
+#include <utils/qtcassert.h>
+
 #include <QtCore/QStringBuilder>
 #include <QtGui/QTextDocument>
 #include <QDebug>
@@ -220,7 +222,7 @@ QString DoxygenGenerator::commandSpelling(Command command)
     if (command == ReturnCommand)
         return QLatin1String("return ");
 
-    Q_ASSERT(command == BriefCommand);
+    QTC_ASSERT(command == BriefCommand, return QString());
     return QLatin1String("brief ");
 }
 
diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp
index 64ccb8ed4c6f77416bd01d96f2208b49a16775b4..63b884d47fe1b09a90b1dcefa9dc55617637291c 100644
--- a/src/plugins/cpptools/insertionpointlocator.cpp
+++ b/src/plugins/cpptools/insertionpointlocator.cpp
@@ -44,6 +44,8 @@
 #include <coreplugin/icore.h>
 #include <coreplugin/mimedatabase.h>
 
+#include <utils/qtcassert.h>
+
 using namespace CPlusPlus;
 using namespace CppTools;
 
@@ -173,7 +175,7 @@ protected:
                           bool &needsPrefix,
                           bool &needsSuffix)
     {
-        Q_ASSERT(!ranges.isEmpty());
+        QTC_ASSERT(!ranges.isEmpty(), return);
         const int lastIndex = ranges.size() - 1;
 
         // try an exact match, and ignore the first (default) access spec:
@@ -349,7 +351,7 @@ public:
 
     const Value &get() const
     {
-        Q_ASSERT(_set);
+        QTC_ASSERT(_set, return Value());
         return _value;
     }
 };
diff --git a/src/plugins/cpptools/symbolfinder.cpp b/src/plugins/cpptools/symbolfinder.cpp
index 9d84339de62540ad118fa903646100d68e397081..ffcbb27d9ffe99ad3563e8c3a6b55518922cb76d 100644
--- a/src/plugins/cpptools/symbolfinder.cpp
+++ b/src/plugins/cpptools/symbolfinder.cpp
@@ -13,6 +13,8 @@
 
 #include <QtCore/QDebug>
 
+#include <utils/qtcassert.h>
+
 #include <algorithm>
 #include <utility>
 
@@ -218,7 +220,7 @@ void SymbolFinder::findMatchingDeclaration(const LookupContext &context,
     Scope *enclosingScope = functionType->enclosingScope();
     while (! (enclosingScope->isNamespace() || enclosingScope->isClass()))
         enclosingScope = enclosingScope->enclosingScope();
-    Q_ASSERT(enclosingScope != 0);
+    QTC_ASSERT(enclosingScope != 0, return);
 
     const Name *functionName = functionType->name();
     if (! functionName)