forked from qt-creator/qt-creator
use QTC_ASSERT instead of Q_ASSERT
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
|
||||
#include "procommandmanager.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
ProCommandGroup::ProCommandGroup(const QString &name)
|
||||
@@ -76,7 +78,7 @@ ProCommandManager::~ProCommandManager()
|
||||
|
||||
void ProCommandManager::beginGroup(const QString &name)
|
||||
{
|
||||
Q_ASSERT(!m_group);
|
||||
QTC_ASSERT(!m_group, return);
|
||||
|
||||
if (m_pos != m_groups.count()) {
|
||||
int removecount = m_groups.count() - m_pos;
|
||||
@@ -95,7 +97,7 @@ bool ProCommandManager::hasGroup() const
|
||||
|
||||
void ProCommandManager::endGroup()
|
||||
{
|
||||
Q_ASSERT(m_group);
|
||||
QTC_ASSERT(m_group, return);
|
||||
|
||||
m_groups.append(m_group);
|
||||
m_pos = m_groups.count();
|
||||
@@ -106,7 +108,7 @@ void ProCommandManager::endGroup()
|
||||
|
||||
bool ProCommandManager::command(ProCommand *cmd)
|
||||
{
|
||||
Q_ASSERT(m_group);
|
||||
QTC_ASSERT(m_group, return false);
|
||||
|
||||
if (cmd->redo()) {
|
||||
m_group->appendCommand(cmd);
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "proparserutils.h"
|
||||
#include "proitems.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
@@ -683,7 +685,7 @@ bool ProFileEvaluator::Private::visitProFunction(ProFunction *func)
|
||||
QString text = func->text();
|
||||
int lparen = text.indexOf(QLatin1Char('('));
|
||||
int rparen = text.lastIndexOf(QLatin1Char(')'));
|
||||
Q_ASSERT(lparen < rparen);
|
||||
QTC_ASSERT(lparen < rparen, return false);
|
||||
|
||||
QString arguments = text.mid(lparen + 1, rparen - lparen - 1);
|
||||
QString funcName = text.left(lparen);
|
||||
|
||||
Reference in New Issue
Block a user