[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdb] src: GIT_SILENT assert() -> Q_ASSERT() (silent)
From:       Jaroslaw Staniek <staniek () kde ! org>
Date:       2016-02-29 23:21:25
Message-ID: E1aaX81-0005Dj-EJ () scm ! kde ! org
[Download RAW message or body]

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 = false;
     m_atLast = 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<KDbQuerySchema*>(m_parent));
+    Q_ASSERT(!m_parent || dynamic_cast<KDbQuerySchema*>(m_parent));
     if (*m_expr == expr)
         return;
     *m_expr = 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 *conn)
         , m_active(true)
         , refcount(1)
 {
-    assert(conn);
+    Q_ASSERT(conn);
     KDbTransaction::globalcount++; //because refcount(1) init.
     KDbTransactionData::globalcount++;
     transactionsDebug() << "-- globalcount ==" << KDbTransactionData::globalcount;
diff --git a/src/drivers/mysql/MysqlPreparedStatement.cpp \
b/src/drivers/mysql/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 == InsertStatement)
         fieldList = m_fields->fields();
     else
-        assert(0); //impl. error
+        Q_ASSERT(0); //impl. error
 
     KDbField::ListIterator itFields(fieldList->constBegin());
     for (QList<QVariant>::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() == KDb::SpecialBinaryExpression) {
                 KDbBinaryExpression t_with_alias = e.toBinary();
-                assert(e.isBinary());
-                assert(t_with_alias.left().expressionClass() == \
                KDb::VariableExpression);
-                assert(t_with_alias.right().expressionClass() == \
KDb::VariableExpression +                Q_ASSERT(e.isBinary());
+                Q_ASSERT(t_with_alias.left().expressionClass() == \
KDb::VariableExpression); +                \
                Q_ASSERT(t_with_alias.right().expressionClass() == \
                KDb::VariableExpression
                        && (t_with_alias.token() == KDbToken::AS || \
t_with_alias.token() == KDbToken::AS_EMPTY));  t_e = \
t_with_alias.left().toVariable();  aliasString = \
t_with_alias.right().toVariable().name();  } else {
                 t_e = e.toVariable();
             }
-            assert(t_e.isVariable());
+            Q_ASSERT(t_e.isVariable());
             QString tname = t_e.name();
             KDbTableSchema *s = globalParser->connection()->tableSchema(tname);
             if (!s) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic