Git commit 63d86fc03364150f1cb4aa4e25a206723bfa2add by Jaroslaw Staniek. Committed on 29/02/2016 at 23:16. Pushed by staniek into branch 'master'. GIT_SILENT assert() -> Q_ASSERT() (from calligra.git) M +1 -1 src/KDbCursor.cpp M +1 -1 src/KDbField.cpp M +1 -1 src/KDbTransaction.cpp M +1 -1 src/drivers/mysql/MysqlPreparedStatement.cpp M +4 -4 src/parser/KDbParser_p.cpp http://commits.kde.org/kdb/63d86fc03364150f1cb4aa4e25a206723bfa2add diff --git a/src/KDbCursor.cpp b/src/KDbCursor.cpp index cb806c5..c288b1c 100644 --- a/src/KDbCursor.cpp +++ b/src/KDbCursor.cpp @@ -57,7 +57,7 @@ KDbCursor::KDbCursor(KDbConnection* conn, KDbQuerySchema*= query, int options) = void KDbCursor::init() { - assert(m_conn); + Q_ASSERT(m_conn); m_conn->addCursor(this); m_opened =3D false; m_atLast =3D false; diff --git a/src/KDbField.cpp b/src/KDbField.cpp index 4fe04d0..3514b61 100644 --- a/src/KDbField.cpp +++ b/src/KDbField.cpp @@ -814,7 +814,7 @@ const KDbExpression KDbField::expression() const = void KDbField::setExpression(const KDbExpression& expr) { - assert(!m_parent || dynamic_cast(m_parent)); + Q_ASSERT(!m_parent || dynamic_cast(m_parent)); if (*m_expr =3D=3D expr) return; *m_expr =3D expr; diff --git a/src/KDbTransaction.cpp b/src/KDbTransaction.cpp index a1f50d0..09339d6 100644 --- a/src/KDbTransaction.cpp +++ b/src/KDbTransaction.cpp @@ -40,7 +40,7 @@ KDbTransactionData::KDbTransactionData(KDbConnection *con= n) , m_active(true) , refcount(1) { - assert(conn); + Q_ASSERT(conn); KDbTransaction::globalcount++; //because refcount(1) init. KDbTransactionData::globalcount++; transactionsDebug() << "-- globalcount =3D=3D" << KDbTransactionData::= globalcount; diff --git a/src/drivers/mysql/MysqlPreparedStatement.cpp b/src/drivers/mys= ql/MysqlPreparedStatement.cpp index 332611c..e6bd68c 100644 --- a/src/drivers/mysql/MysqlPreparedStatement.cpp +++ b/src/drivers/mysql/MysqlPreparedStatement.cpp @@ -275,7 +275,7 @@ bool MysqlPreparedStatement::execute( else if (m_type =3D=3D InsertStatement) fieldList =3D m_fields->fields(); else - assert(0); //impl. error + Q_ASSERT(0); //impl. error = KDbField::ListIterator itFields(fieldList->constBegin()); for (QList::ConstIterator it(parameters.constBegin()); diff --git a/src/parser/KDbParser_p.cpp b/src/parser/KDbParser_p.cpp index f4ad1e0..0fcaacc 100644 --- a/src/parser/KDbParser_p.cpp +++ b/src/parser/KDbParser_p.cpp @@ -339,16 +339,16 @@ KDbQuerySchema* buildSelectQuery( QString aliasString; if (e.expressionClass() =3D=3D KDb::SpecialBinaryExpression) { KDbBinaryExpression t_with_alias =3D e.toBinary(); - assert(e.isBinary()); - assert(t_with_alias.left().expressionClass() =3D=3D KDb::V= ariableExpression); - assert(t_with_alias.right().expressionClass() =3D=3D KDb::= VariableExpression + Q_ASSERT(e.isBinary()); + Q_ASSERT(t_with_alias.left().expressionClass() =3D=3D KDb:= :VariableExpression); + Q_ASSERT(t_with_alias.right().expressionClass() =3D=3D KDb= ::VariableExpression && (t_with_alias.token() =3D=3D KDbToken::AS || t_w= ith_alias.token() =3D=3D KDbToken::AS_EMPTY)); t_e =3D t_with_alias.left().toVariable(); aliasString =3D t_with_alias.right().toVariable().name(); } else { t_e =3D e.toVariable(); } - assert(t_e.isVariable()); + Q_ASSERT(t_e.isVariable()); QString tname =3D t_e.name(); KDbTableSchema *s =3D globalParser->connection()->tableSchema(= tname); if (!s) {